refactor: simplify StaticRender layout computation#105
Open
jacob314 wants to merge 5 commits into
Open
Conversation
096969a to
3ceb63f
Compare
jacob314
commented
Apr 9, 2026
Owner
Author
There was a problem hiding this comment.
these changes are correct. Previous snapshot had a bug as seen by missing the footer.
jacob314
commented
Apr 9, 2026
Owner
Author
There was a problem hiding this comment.
just reflects only showing what is in the viewport
Moved StaticRender's layout evaluation to prepareYogaTree inside ink.tsx. This avoids repeatedly evaluating static subtrees during the main layout loop, treating nested and cached StaticRender components as efficient, fixed-size leaf nodes. Update cachedStickyHeaders mapping in render-node-to-output to set 'node: undefined' to drop the retained reference to the DOM element after computing the sticky header layout cache. Update all usages to handle the optional stickyNode property and resolve max-params typescript errors. docs: add note to GEMINI.md regarding max-params performance Add instruction to explicitly avoid destructured objects for resolving max-params linting errors in hot-path rendering code, instead preferring to ignore the linter rule due to GC allocation overhead.
…Changed Inverted the boolean returns inside it, and changed the caller to negate the return value.
3ceb63f to
2a464d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moved StaticRender's layout evaluation to prepareYogaTree inside ink.tsx. This avoids repeatedly evaluating static subtrees during the main layout loop, treating nested and cached StaticRender components as efficient, fixed-size leaf nodes.
Update cachedStickyHeaders mapping in render-node-to-output to set 'node: undefined' to drop the retained reference to the DOM element after computing the sticky header layout cache. Update all usages to handle the optional stickyNode property and resolve max-params typescript errors.
docs: add note to GEMINI.md regarding max-params performance
Add instruction to explicitly avoid destructured objects for resolving max-params linting errors in hot-path rendering code, instead preferring to ignore the linter rule due to GC allocation overhead.