[PR #474] [MERGED] bench: replace the measureForDimensions bench #562

Closed
opened 2026-03-02 23:47:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

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

Base: mainHead: fix-measure-dimensions-bench


📝 Commits (1)

  • 76ce73c bench: model Yoga layout measure passes

📊 Changes

1 file changed (+27 additions, -8 deletions)

View changed files

📝 packages/core/src/zig/bench/text-buffer-view_bench.zig (+27 -8)

📄 Description

Sorry, for revisiting this so quickly. I'm still getting my head around the code-base. I think I added a PR for that benchmark change a little too quick and it didn't really capture what I wanted to test.

I replace the measureForDimensions bench with a layout-pass simulation that does multiple measure calls per step. This matches the real Yoga pattern during streaming and keeps an intrinsic width case.

Drop the old static/streaming variants that only measured once per token as they didn't add much value.


🔄 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/474 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix-measure-dimensions-bench` --- ### 📝 Commits (1) - [`76ce73c`](https://github.com/anomalyco/opentui/commit/76ce73cbb22ca69079c7977c583ae96209add9cf) bench: model Yoga layout measure passes ### 📊 Changes **1 file changed** (+27 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/bench/text-buffer-view_bench.zig` (+27 -8) </details> ### 📄 Description Sorry, for revisiting this so quickly. I'm still getting my head around the code-base. I think I added a PR for that benchmark change a little too quick and it didn't really capture what I wanted to test. I replace the measureForDimensions bench with a layout-pass simulation that does multiple measure calls per step. This matches the real Yoga pattern during streaming and keeps an intrinsic width case. Drop the old static/streaming variants that only measured once per token as they didn't add much value. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:47:06 +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#562
No description provided.