Repository navigation
perf(editor): skip timeline rebuild for model-irrelevant slider edits - #3264
Merged
richiemcilroy merged 1 commit intoOct 25, 2026
Merged
Conversation
Contributor
|
@PravinMandal is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
PravinMandal
force-pushed
the
perf/slider-timeline-rebuild
branch
from
October 25, 2026 17:39
7fd5e5a to
e758eff
Compare
The background, camera, cursor, caption, keyboard, color-grade and animated-gradient sliders only write fields TimelineModel::build and TrackLanes::from_project do not read, yet every drag rebuilt both. Classify every variant of those seven enums explicitly and route safe edits through project_changed_without_timeline. Audio levels and segment fields keep the full rebuild; animated-gradient add/remove/stop/reset edits share the safe route. Benchmark: 2,000 synthetic clips with every track kind (a stress fixture, not a typical project), release 175.189 us and debug 0.51-0.59 ms per skipped TimelineModel::build_with_lanes (median of 10 samples, 10 iterations each, warmup 3; host load ~6). The rest of project_changed (history, publish, save, notify) is unchanged and not measured.
PravinMandal
force-pushed
the
perf/slider-timeline-rebuild
branch
from
October 25, 2026 18:47
e758eff to
a3817dd
Compare
Contributor
Author
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Classify every variant of the seven sidebar slider enums explicitly, then route the edits that cannot change the timeline through
project_changed_without_timeline.Covered sliders:
BgSlider)CameraSlider)CursorSlider)CaptionSlider)KeyboardSlider)GradeSlider)Audio levels, clip volume, segment fields, and panel sliders keep the full rebuild.
Why
A slider drag on a large project rebuilt
TimelineModelandTrackLaneseven when the edited field was never read by either. On a 2,000-clip stress fixture the skipped rebuild costs 171–175 µs release and 0.51–0.59 ms debug per edit. The rest ofproject_changed— history, publish, save, notify — is unchanged and still runs.Benchmark
cargo test --release --manifest-path apps/desktop-gpui/Cargo.toml --bin cap-gpui -- \ --ignored benchmark_slider_edit_skips_timeline_rebuild --nocaptureTimelineModel::build_with_lanesThe fixture is 2,000 synthetic contiguous clips plus every track kind. It is a stress case, not a typical project. The benchmark measures only the skipped rebuild; history, publish, save, and notify are not included. Host load was ~6 during the runs.
Correctness
TrackLanes::from_projectfrom the mutated project and compares the full debug model before/after.TimelineModel::buildandTrackLanes::from_projectdo not read the background.Tests
All pass on
7c4395e5dafter rebase (a3817dd4).git diff --checkis clean.The rebase picked up the manual-caption position sliders from #3230;
ManualXand
ManualYare classified no-rebuild and pinned in the same table test.Scope / caveats
apps/desktop-gpui.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Skips timeline rebuilds for explicitly classified styling sliders and animated-gradient edits.
Reviews (2) · Last reviewed commit: "perf(editor): skip timeline rebuild for ..." · Reviewed by Greptile