Skip to content

Foldable perf#1578

Merged
sinelaw merged 1 commit intomasterfrom
foldable_perf
Apr 15, 2026
Merged

Foldable perf#1578
sinelaw merged 1 commit intomasterfrom
foldable_perf

Conversation

@sinelaw
Copy link
Copy Markdown
Owner

@sinelaw sinelaw commented Apr 15, 2026

No description provided.

This commit addresses severe UI freezes and garbage collection thrashing (JS_CallInternal) caused by processing thousands of streaming grep matches.

Key optimizations:
- Throttled Streaming: Cap UI rebuilds during active searches to run at most 10 times per second (100ms interval) instead of on every chunk received.
- Array Allocation: Replace O(N^2) `Array.concat()` with an in-place `push()` loop to avoid massive memory allocations when merging match results.
- Strict UI Virtualization: Modify `buildPanelEntries` to map a flat list of items and strictly compute display strings, padding, and regex highlights ONLY for the rows currently visible in the viewport.
@sinelaw
Copy link
Copy Markdown
Owner Author

sinelaw commented Apr 15, 2026

Fixes #1575

@sinelaw sinelaw merged commit c8ebfd9 into master Apr 15, 2026
7 of 8 checks passed
@sinelaw sinelaw deleted the foldable_perf branch April 15, 2026 17:21
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