mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #475] [MERGED] perf(text-buffer-view): cache measureForDimensions results #563
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#563
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/475
Author: @simonklee
Created: 1/5/2026
Status: ✅ Merged
Merged: 1/5/2026
Merged by: @kommander
Base:
main← Head:perf-measure-dimensions📝 Commits (3)
e7dc7c4perf(text-buffer-view): add cache and arena reuse in measureForDimensionsace275bMerge branch 'main' into perf-measure-dimensionse5908afsome more test coverage📊 Changes
7 files changed (+564 additions, -13 deletions)
View changed files
📝
packages/core/src/text-buffer-view.test.ts(+64 -0)📝
packages/core/src/zig/tests/text-buffer-view_test.zig(+102 -0)📝
packages/core/src/zig/tests/wrap-cache-perf_test.zig(+5 -3)📝
packages/core/src/zig/text-buffer-view.zig(+68 -8)📝
packages/core/src/zig/text-buffer.zig(+21 -2)📝
packages/solid/tests/__snapshots__/textarea.test.tsx.snap(+170 -0)📝
packages/solid/tests/textarea.test.tsx(+134 -0)📄 Description
Yoga calls measureForDimensions repeatedly during layout. This adds caching
keyed by (buffer, epoch, width, wrap_mode) to avoid repeated rope walks.
I can split up the arena-reuse if you prefer that in another PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.