f7cf21b661
## Issue #6332 <Thumbnail lazy-loader is too slow || Use browser-level lazy-loading> ## Change Switch from "threshold-based check" to "viewport distance comparison" using the `rootMargin` parameter. The root is the viewport. This change makes it closer to the native `loading="lazy"` behavior, where it starts to load when approaching the viewport. Chrome I believe uses 3000px distance -- I think 500px is a good compromise for now. Can adjust further. ## Future - We are currently creating N instances of IntersectionObserver. - https://developers.google.com/web/updates/2016/04/intersectionobserver - "If you need to observe multiple elements, it is both possible and advised to observe multiple elements using the same IntersectionObserver instance by calling observe() multiple times." This would probably need a refactor to make ClaimList (or something higher) own the IntersectionObserver. |
||
---|---|---|
.. | ||
use-combined-refs.js | ||
use-drag-drop.js | ||
use-fetched.js | ||
use-get-ads.js | ||
use-get-livestreams.js | ||
use-get-thumbnail.js | ||
use-history-nav.js | ||
use-hover.js | ||
use-is-mounted.js | ||
use-lazy-loading.js | ||
use-lighthouse.js | ||
use-persisted-state.js | ||
use-previous.js | ||
use-screensize.js | ||
use-stream-file.js | ||
use-stream.js | ||
use-throttle.js | ||
use-tween.js | ||
use-zoom.js |