Skip to content

Remove recurring UI frame allocations - #73

Merged
treeform merged 1 commit into
masterfrom
frame-allocations
Oct 7, 2026
Merged

treeform merged 1 commit into
masterfrom
frame-allocations

Conversation

@treeform

@treeform treeform commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Scaled UI frames allocated a new vertex buffer, and unchanged input frames allocated a closure environment while checking callback identities. Reuse the context's scaled vertex storage and create input wrappers only when a callback actually changes.

Validation:

  • Added a regression asserting zero allocations across 100 unchanged input frames, and enabled it in CI with -d:nimTypeNames.
  • Nim checks and input, layout, layout regression, clipping, atlas, and textbox tests.
  • Native and WASM GotA rendering checked; its warmed render capture has no recurring allocations with these fixes and the accompanying renderer cleanup.

@treeform
treeform merged commit 3c5dd56 into master Oct 7, 2026
8 checks passed
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