Files
bitvid/dist
google-labs-jules[bot]andPR0M3TH3AN 5e1709b900 perf: Optimize docs scrollspy using IntersectionObserver
Replaces the O(N) getBoundingClientRect polling loop in the docs scroll spy with an IntersectionObserver. This eliminates potential layout thrashing and reduces main thread CPU usage during scrolling.

- Replaces `window.addEventListener("scroll")` with `IntersectionObserver`.
- Maintains active section state using `passedHeadings` set.
- Updates `setupScrollSpy` and `clearScrollSpy` to manage the observer.
- Preserves existing behavior where the active section is the last one that has passed the top offset (96px). Note: Activation now occurs when the header *fully* exits the top offset area, which is a minor behavior change (delayed by header height) but improves performance and stability.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 21:04:36 +00:00
..
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00
2026-01-30 17:09:51 -05:00