[PR #473] [MERGED] improve word wrap perf by tracking byte_offset instead of recalc #1342

Closed
opened 2026-03-14 09:31:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/473
Author: @kommander
Created: 1/5/2026
Status: Merged
Merged: 1/5/2026
Merged by: @kommander

Base: mainHead: fix-word-wrap-perf


📝 Commits (10+)

📊 Changes

5 files changed (+330 additions, -16 deletions)

View changed files

packages/core/src/tests/wrap-resize-perf.test.ts (+200 -0)
📝 packages/core/src/zig/test.zig (+2 -0)
packages/core/src/zig/tests/wrap-cache-perf_test.zig (+110 -0)
📝 packages/core/src/zig/text-buffer-segment.zig (+3 -2)
📝 packages/core/src/zig/text-buffer-view.zig (+15 -14)

📄 Description

  • fix double allocation for wrap breaks

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/473 **Author:** [@kommander](https://github.com/kommander) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix-word-wrap-perf` --- ### 📝 Commits (10+) - [`9f7ad46`](https://github.com/anomalyco/opentui/commit/9f7ad46df5b9c593e8629e59f912528cedeed69e) stash - [`4a07f90`](https://github.com/anomalyco/opentui/commit/4a07f9040a7d5c72b4b5edb4ae06c2e2577bfa8d) ts resize test - [`834fc85`](https://github.com/anomalyco/opentui/commit/834fc859a913850313de9f80f76bbf4745fa7c94) refactor - [`0a16cfd`](https://github.com/anomalyco/opentui/commit/0a16cfd2267451a6d45ececd10ec22a7f2780625) better tests - [`2621627`](https://github.com/anomalyco/opentui/commit/26216278bb84324721789167da479ccb51300d3d) better tests - [`0b8fc86`](https://github.com/anomalyco/opentui/commit/0b8fc860f6c7994cbfd77f65c662013e3a1f9008) amend - [`0685da4`](https://github.com/anomalyco/opentui/commit/0685da47b568ba166c6b03743b2a5cb63b6af29e) remove ineffective tests - [`4c09f45`](https://github.com/anomalyco/opentui/commit/4c09f453e543e4eb0c20a5416f7cb98e107fccc6) cleanup - [`bbc9f9a`](https://github.com/anomalyco/opentui/commit/bbc9f9a361ef8438416e836cf7be8b44ced9609d) cleanup - [`3ae8bfc`](https://github.com/anomalyco/opentui/commit/3ae8bfc82d7b1096689a3bc08006272fc9fc7f04) fix double alloc ### 📊 Changes **5 files changed** (+330 additions, -16 deletions) <details> <summary>View changed files</summary> ➕ `packages/core/src/tests/wrap-resize-perf.test.ts` (+200 -0) 📝 `packages/core/src/zig/test.zig` (+2 -0) ➕ `packages/core/src/zig/tests/wrap-cache-perf_test.zig` (+110 -0) 📝 `packages/core/src/zig/text-buffer-segment.zig` (+3 -2) 📝 `packages/core/src/zig/text-buffer-view.zig` (+15 -14) </details> ### 📄 Description + fix double allocation for wrap breaks --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:31:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1342
No description provided.