Skip to content

refactor: simplify StaticRender layout computation#105

Open
jacob314 wants to merge 5 commits into
masterfrom
render_static_7
Open

refactor: simplify StaticRender layout computation#105
jacob314 wants to merge 5 commits into
masterfrom
render_static_7

Conversation

@jacob314

@jacob314 jacob314 commented Apr 9, 2026

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes are correct. Previous snapshot had a bug as seen by missing the footer.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
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.

1 participant