Skip to content

perf(gpui): index auto-zoom cursor clusters - #2599

Merged
richiemcilroy merged 7 commits into
CapSoftware:mainfrom
colinvkim:perf/gpui-zoom-cluster-lookup
Oct 20, 2026
Merged

richiemcilroy merged 7 commits into
CapSoftware:mainfrom
colinvkim:perf/gpui-zoom-cluster-lookup

Conversation

@colinvkim

@colinvkim colinvkim commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

A paused edit in GPUI rebuilds the zoom simulation up to the playhead. Inside a long auto-zoom segment, every 8 ms step scans the cursor clusters backward. This PR records whether each cluster list is ordered and uses binary search when it is. Unordered data keeps the original scan, including its duplicate-timestamp and before-first behavior.

On a synthetic ten-minute 1080p recording with one continuous auto zoom, edit-to-preview latency at 9:48 falls from 20.74 ms to 12.34 ms, about 40.5% lower.

Complements merged #2557 by removing the remaining cluster-center scan.

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Auto-zoom now uses binary search for time-ordered cursor clusters and keeps the original reverse scan for unordered clusters.

  • Auto zoom finds cursor clusters faster when their times are ordered.

Reviews (2) · Last reviewed commit: "refactor(rendering): simplify zoom looku..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@colinvkim

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy

Copy link
Copy Markdown
Member

Pushed 5aa476a: #2679 merged a test that calls cluster_center_at_time, which this PR replaces, so the branch stopped compiling after the update. The test now uses ClusterCenters::new(clusters).center_at(2000.0).

@richiemcilroy
richiemcilroy merged commit d75f5dd into CapSoftware:main Oct 20, 2026
44 of 46 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.

2 participants