[PR #463] [MERGED] optimize edit-tool rendering #9616

Closed
opened 2026-02-16 18:13:51 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/463
Author: @Schniz
Created: 6/27/2025
Status: Merged
Merged: 6/28/2025
Merged by: @adamdotdevin

Base: devHead: schniz/make-rendering-a-bit-faster


📝 Commits (2)

  • 4a41a7f Optimize TUI rendering performance and refactor measurement utilities
  • e5c57cb Merge branch 'dev' into schniz/make-rendering-a-bit-faster

📊 Changes

4 files changed (+88 additions, -9 deletions)

View changed files

📝 packages/tui/internal/components/chat/messages.go (+5 -0)
📝 packages/tui/internal/components/diff/diff.go (+23 -9)
packages/tui/internal/util/concurrency.go (+50 -0)
📝 packages/tui/internal/util/util.go (+10 -0)

📄 Description

  • Add parallelization to TUI message rendering operations
  • Create generic concurrency helpers for improved performance
  • Update messages component to use simplified Measure function with message count logging

in the future i think we should add opentelemetry for easier debugging and perf reporting.
but for now i added the util.Measure helper. Maybe it will only be used in the messages pane which is the heaviest one,
doing it one per message is VERY verbose. Doing it one per message part is not acceptable

I have concerns about spawning so many goroutines, I need to understand why stuff is slow.
Feels weird to not think about concurrency limits--for instance if the syntax highlight was using bat,
you wouldn't want to spawn hundreds of processes (or would you?) in parallel.

resolves #446


🔄 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/opencode/pull/463 **Author:** [@Schniz](https://github.com/Schniz) **Created:** 6/27/2025 **Status:** ✅ Merged **Merged:** 6/28/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `schniz/make-rendering-a-bit-faster` --- ### 📝 Commits (2) - [`4a41a7f`](https://github.com/anomalyco/opencode/commit/4a41a7f90f1ef4f5ff3bc758c7029b02da0ee9d6) Optimize TUI rendering performance and refactor measurement utilities - [`e5c57cb`](https://github.com/anomalyco/opencode/commit/e5c57cbdf7b94fec7cdb95077535080925b701b2) Merge branch 'dev' into schniz/make-rendering-a-bit-faster ### 📊 Changes **4 files changed** (+88 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/messages.go` (+5 -0) 📝 `packages/tui/internal/components/diff/diff.go` (+23 -9) ➕ `packages/tui/internal/util/concurrency.go` (+50 -0) 📝 `packages/tui/internal/util/util.go` (+10 -0) </details> ### 📄 Description - Add parallelization to TUI message rendering operations - Create generic concurrency helpers for improved performance - Update messages component to use simplified Measure function with message count logging in the future i think we should add opentelemetry for easier debugging and perf reporting. but for now i added the util.Measure helper. Maybe it will only be used in the messages pane which is the heaviest one, doing it one per message is _VERY_ verbose. Doing it one per message part is not acceptable I have concerns about spawning so many goroutines, I need to understand why stuff is slow. Feels weird to not think about concurrency limits--for instance if the syntax highlight was using `bat`, you wouldn't want to spawn hundreds of processes (or would you?) in parallel. resolves #446 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:51 -05:00
yindo closed this issue 2026-02-16 18:13:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9616