Repository navigation
perf(project): resolve hidden cursor windows without allocation - #3437
Open
OptimistOtaku wants to merge 1 commit into
Open
OptimistOtaku wants to merge 1 commit into
OptimistOtaku wants to merge 1 commit into
Conversation
Contributor
|
@OptimistOtaku is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
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.
Playback and export call
cursor_visibility_atfor every frame. When a project contains hidden-cursor clips, it constructs and drops a vector of every hidden run just to select the run containing that frame.Merge runs while retaining the first matching window and the total clip duration, using fixed stack storage. The complete traversal remains necessary for fades at the timeline's end. Fullscreen-hold mapping, transition arithmetic, adjacent-run merging, exclusive end boundaries, and fade calculations retain their previous behavior. The small no-hidden-clips entry path is kept separate from the heavier implementation.
Measurements
Windows x86_64, Ryzen 5 5600H, Rust 1.88 GNU, repository release profile (
opt-level=s, thin LTO). Nine alternating paired samples after warmups, each with 10,000 varying frame times. The ignored benchmark compares the exact previous functions with production code and checks complete float-bit equivalence before timing.The benefit is concentrated in hidden-clip projects without large transition/hold workloads. No-hidden controls cost approximately 6–48 ns more in the larger fixtures; the 1,000-clip transition/hold control was about 4% slower. A second complete run retained the hidden-clip gains and that largest control's regression. Hold-window allocation and full clip traversal remain. These measure cursor visibility CPU work, excluding GPU rendering and overall FPS.
cargo test --locked -p cap-project --release --lib benchmark_cursor_visibility -- --ignored --nocaptureValidation
cargo fmt --all,cargo check --locked -p cap-projectcargo test --locked -p cap-project --lib --tests: 196 library tests and four integration tests passed; five benchmarks ignored by default, new benchmark run separately.cargo clippy --locked -p cap-project --all-targets -- -D warningsgit diff --checkDifferential tests cover every hidden/visible pattern through six clips, fractional speeds, transitions, overlapping fullscreen holds, exact fade/window boundaries and neighboring representable timestamps, empty timelines, degenerate clips, and non-finite inputs. No dependencies, platform-specific code, persistent caches, or project-format changes. The native GPUI app was not launched locally. This branch is independent of #3436.


Confidence Score: 5/5
The PR appears safe to merge.Summary
Replaces the allocated list of hidden-cursor runs with one matching run while preserving the total duration.
Reviews (1) · Last reviewed commit: "perf(project): resolve hidden cursor win..." · Reviewed by Greptile