Skip to content

WIP: performance optimizations#13667

Draft
KRRT7 wants to merge 5 commits into
warpdotdev:masterfrom
KRRT7:WIP
Draft

WIP: performance optimizations#13667
KRRT7 wants to merge 5 commits into
warpdotdev:masterfrom
KRRT7:WIP

Conversation

@KRRT7

@KRRT7 KRRT7 commented Jul 13, 2026

Copy link
Copy Markdown

Description

Performance optimization stack focused on terminal hot paths:

  • Optimizes terminal flat-storage rebuild/replay paths, including arithmetic fast paths, capacity reuse, dense-row replay, cursor resize hardening, differential/property tests, fuzz coverage, and Criterion benchmark coverage.
  • Reduces fuzzy/file search and input-edit hot-path work, including safer multibyte handling in AI context edits.
  • Avoids redundant terminal block-list height/layout work for rich content updates.

Latest VM benchmark summary after cargo clean, comparing upstream/master b43821d0 against branch a2c2a9e1 with representative flat-storage rebuild workloads:

  • Single resize cases were 64.7%-89.1% faster across command history, cargo build logs, long soft-wrapped output, agent transcripts, and cursor blank-tail sessions.
  • Resize sequence cases were 68.4%-85.5% faster.
  • Largest representative win: cargo-build-log single resize to 160 cols, 1.65ms -> 0.18ms, 89.1% faster.
  • All measured cases improved with Criterion significance p < 0.05.
Workload Single resize improvement Resize sequence improvement
command history 65.8%-72.7% faster 70.7% faster
cargo build log 84.0%-89.1% faster 85.5% faster
long soft-wrapped output 72.4%-81.2% faster 76.9% faster
agent transcript 66.7%-76.4% faster 72.5% faster
cursor blank-tail session 64.7%-76.2% faster 68.4% faster

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • cargo fmt --all
  • env -u RUSTC_WRAPPER cargo nextest run -p warp -E 'test(test_gap_after_banner) | test(test_removed_gap_with_banner) | test(test_update_padding_block_heights) | test(test_remove_rich_content_block) | test(test_update_rich_content_heights_in_lines_updates_changed_items_by_position)'
  • git diff --check upstream/master..HEAD
  • VM Criterion comparison: temporary representative flat_storage rebuild harness, upstream/master b43821d0 vs branch a2c2a9e1; artifacts in /root/warp/target/criterion/flat_storage_representative_*.

Not yet run: full ./script/presubmit / full workspace clippy.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Not applicable: internal performance changes with benchmark coverage.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-NONE

@cla-bot cla-bot Bot added the cla-signed label Jul 13, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jul 13, 2026
KRRT7 added 3 commits July 13, 2026 15:38
Rework flat-storage indexing and replay around faster row paths.

- Add arithmetic rebuild fast paths for uniform rows, carry-over rows, and wide-character spacer cases.

- Preserve EntryBuilder capacity across flushes and add dense single-width row replay.

- Harden truncate and cursor-offset edge cases used by resize.

- Add differential/property tests, a fuzz target, and rebuild benchmark coverage.
Optimize repeated fuzzy/file-search work and input edit checks.

- Add ASCII fast paths for wildcard matching, session/search columns, and remote result columns.

- Reuse parsed fuzzy path query metadata instead of re-scanning wildcard state per candidate.

- Avoid repeated editor buffer reads while handling input edits and AI context checks.

- Fix multibyte @ context handling and navigation query heuristics with targeted coverage.
Reduce repeated model and layout work in the terminal block list.

- Skip live block-height SumTree rewrites when the computed height is unchanged.

- Update rich-content heights by targeted SumTree item replacement instead of a full rebuild.

- Track rich-content and CLI subagent children laid out in the current frame so after_layout only visits active children.

- Add model coverage for mixed rich-content/banner positions and unchanged height updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant