Skip to content

perf(desktop-gpui): keep long clip lists responsive - #2705

Merged
richiemcilroy merged 3 commits into
CapSoftware:mainfrom
AksharP5:perf/virtual-clip-sidebar
Oct 19, 2026
Merged

richiemcilroy merged 3 commits into
CapSoftware:mainfrom
AksharP5:perf/virtual-clip-sidebar

Conversation

@AksharP5

@AksharP5 AksharP5 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Long timelines make the Clips sidebar expensive to redraw because it builds every card, including hundreds outside the viewport. This uses GPUI's existing uniform list to render visible cards and keeps drag targets tied to their timeline indices.

Card rendering stays the same. Scroll limits and the final gap match the existing list. During inline rename, the list keeps all rows mounted so Enter and Escape still work after the input scrolls out of view.

Closes #2704.

Performance

Isolated native GPUI sidebar CPU measurements against current main:

Clips Before After
6 0.40 ms 0.39 ms
20 1.24 ms 0.56 ms
100 5.92 ms 0.56 ms
500 39.96 ms 0.56 ms

Median scrolling work at the top of a 390 × 600 viewport. Seven alternating paired runs, 80 scroll events each after warmup, optimized build on an i5-14400F. The probe uses the actual card/list code, bundled assets/fonts, and pinned GPUI with Cap's patches. Starting midway through the list gives the same improvement. This measures component CPU work, excluding media I/O and GPU presentation; it is not a full-app FPS claim.

Validation

  • Native app cargo check, formatting and all 24 editor_clips::tests pass.
  • Native before/after comparisons match for 96 geometry/scroll snapshots, 88,416 drop-target positions, and Enter/Escape rename actions with the input visible and offscreen. Covers dark/light themes and loaded/placeholder thumbnails.
  • Strict Clippy reports the same 27 existing diagnostics on unchanged main and this branch under Rust 1.99, with no new diagnostics.

Checked all 276 open PRs and 211 other open issues, including overlapping file changes and discussions. Found no existing sidebar virtualization work.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

The Clips sidebar now uses uniform_list to build visible cards instead of the entire list.

  • The Clips sidebar renders long timelines without building every card.

No actionable issues were found. This review checked source code; it did not run the app or tests.

Reviews (1) · Last reviewed commit: "perf(desktop-gpui): keep long clip lists..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@AksharP5 is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@richiemcilroy
richiemcilroy merged commit 71e0877 into CapSoftware:main Oct 19, 2026
37 of 39 checks passed
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.

Clips sidebar redraw cost grows with offscreen timeline clips

2 participants