intermine / intermine/bluegenes

Defer loading of im-tables/viz outside viewport

Open
#745 0 comments 0 reactions 0 assignees View on GitHub
Report page
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.