Skip to content

Optimize viewer syncing with IntersectionObserver to avoid tile request storms#104

Open
arthur-flam wants to merge 1 commit intomasterfrom
claude/optimize-viewer-syncing-7TFCh
Open

Optimize viewer syncing with IntersectionObserver to avoid tile request storms#104
arthur-flam wants to merge 1 commit intomasterfrom
claude/optimize-viewer-syncing-7TFCh

Conversation

@arthur-flam
Copy link
Copy Markdown
Member

When a page has 50+ image viewers synced by resolution, zooming in one
viewer would trigger zoomTo/panTo on all others, causing a massive spike
of tile requests and animations. Use IntersectionObserver to track which
viewers are near the viewport (200px margin) and only sync those. Off-screen
viewers catch up instantly (no animation) when they scroll into view.

https://claude.ai/code/session_01HTJYHmtsz7SkLWhWuDLvCR

…st storms

When a page has 50+ image viewers synced by resolution, zooming in one
viewer would trigger zoomTo/panTo on all others, causing a massive spike
of tile requests and animations. Use IntersectionObserver to track which
viewers are near the viewport (200px margin) and only sync those. Off-screen
viewers catch up instantly (no animation) when they scroll into view.

https://claude.ai/code/session_01HTJYHmtsz7SkLWhWuDLvCR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants