intermine / intermine/bluegenes
Defer loading of im-tables/viz outside viewport
- Dominant language
- Clojure
- Stars
- 75
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
This should help a lot with the initial loading time of the page. Might be difficult to make it work smoothly though.
https://stackoverflow.com/questions/123999/how-can-i-tell-if-a-dom-element-is-visible-in-the-current-viewport/7557433#7557433
This can be short-circuited, meaning as soon as we find an element outside and below the viewport (starting from the top), we can assume that all proceeding elements (below it) are also outside the viewport. It might work better as a setInterval instead of scroll listener, as that would help us avoid loading elements that are skipped if the user uses the ToC to skip to a specific section.
Contributor guide
Research direction
Start by tracing where the im-tables/viz elements are rendered and how the table of contents navigates to sections. Review the linked viewport-visibility discussion, then determine how deferred loading should behave for scrolling and skipped sections; done means below-viewport elements do not load initially while targeted sections still load smoothly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- frontend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100