GitHub details idle-gated height measurement and resize correction for rendered blocks
Overview
GitHub says it first gave every dynamic block a ResizeObserver that wrote measured heights back into the layout.
It rejected that design, saying an observer that writes a height into the layout it watches can retrigger itself, and the cost grows with every mounted block.
The replacement, GitHub says, runs a recurring measurement pass gated on idle time and scoped to about 2400px around the viewport. Mounted blocks serve as the ground truth, and observers normally only flag blocks for that pass rather than writing heights themselves. One exception applies a single synchronous correction before paint when a visible block resizes because of the user's action.
Written by AI from the articles below · updated Oct 12, 2:12 PM ET
Check the sources:
Developments
2 developments
- Oct 12, 2:06 PM ET · 1 articleGitHub details idle-gated measurement and resize correction for rendered blocksGitHub: GitHub details idle-gated measurement and resize correction for rendered blocks
- Oct 12, 2:06 PM ET · 1 articleGitHub describes rejecting a ResizeObserver-based layout design for dynamic blocksGitHub: GitHub rejects a ResizeObserver layout design over self-retriggering cost
Article timeline
The articles in this story. Times are ET.
GitHub@githubOfficialGitHub details idle-gated measurement and resize correction for rendered blocksAIGitHub says it shipped a recurring measurement pass, gated on idle and scoped to roughly 2400px around the viewport. Mounted blocks serve as ground truth, and observers normally only flag blocks for the pass rather than writing heights themselves. One exception applies one synchronous correction before paint when a visible block resizes because of the user's action.
GitHub@githubOfficialGitHub rejects a ResizeObserver layout design over self-retriggering costAIGitHub says it first gave every dynamic block a ResizeObserver that wrote measured heights back into the layout. It rejected that design because an observer writing heights into the layout it watches can retrigger itself, with cost growing as more blocks mount.
Heat trend
Not enough continuous observations to show a trend yet.