You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Raw cursor playback and export repeatedly scan mouse events from the start #2488
With Smooth Movement disabled, GPUI playback and export prepare cursor position, velocity, and motion-blur history by scanning mouse events from the beginning on each query. The CPU work grows as playback advances through a long recording.
The callers already construct PrecomputedCursorTimeline, but ProjectUniforms::new_with_precomputed_cursor bypasses it when the effective cursor configuration is raw. A raw cursor style override on a smoothed project follows the same path.
Reproduction
Open a long Studio recording with frequent mouse movement in the GPUI editor.
Disable Smooth Movement in the cursor settings, or apply a raw cursor style override.
Play near the end of the recording, or export it.
The accompanying PR's ignored benchmark_raw_cursor_uniform_preparation test reproduces the CPU cost through the production constructor, independently of decoding and GPU rendering, using synthetic continuously moving 60 Hz traces.
On a one-hour trace with 216,001 moves, median preparation near the end was 684.808 µs on main and 0.502 µs with ordered lookup (three sequential runs; 512 measured frames after 32 warmups). These are CPU preparation timings, not total playback or export timings.
Additional Context
Cap source: main at 40b06b92ac57b87f9bdb52e4eff8429d0ea319c3.
Verified through the production constructor and native rendering tests; interactive app execution was not tested.
The fix checks ordering once and uses binary lookup, keeping the original scan for unordered sources. Rendered output is byte-identical in the regression fixture.
Activity
linear commentedon Oct 13, 2026
CAP-841