Repository navigation
Conversation
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. |
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.
Scrolling down a long Clips sidebar can leave visible thumbnails waiting behind decodes for cards you cannot see. Opening the sidebar also eventually decodes and keeps every thumbnail, even if you never scroll.
Request a thumbnail from the existing card-bounds probe only when the card intersects its current clip mask. Keep the existing decoder, cache keys, failure handling and two-job limit. Previously unseen cards load when they enter the viewport; revisiting a card reuses its cached image.
Closes #2706.
Verification
After loading the first viewport and jumping to the end, time until all visible thumbnails finish decoding:
Seven alternating paired runs of the unchanged native decoder, with two worker threads on an i5-14400F. An optimized probe replays request order observed from native GPUI scrolling, using a synthetic 1080p H.264 recording and a 390 × 600 viewport. This measures decoder completion, excluding UI frame pacing and GPU presentation.
An idle 100-clip sidebar also retains 8 thumbnails instead of 100: 0.63 MiB instead of 7.91 MiB of thumbnail pixels.
The native GPUI replay covers 23 before/after scenarios, including dark/light themes, short and empty lists, partially visible rows, scrolling with jobs pending, duplicate keys, decode failure, resizing and cached return visits. Visible pixel hashes match and concurrency stays at two.
Native app
cargo check, formatting and all 23editor_clips::testspass. Strict Clippy reports the same 27 pre-existing diagnostics on unchanged main and this patch under Rust 1.99, with no new findings.This applies independently to current main. Related #2705 reduces card rendering work; this change avoids offscreen thumbnail decoding. Checked the current open PRs and issues for duplicate work.


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Requests clip thumbnails from each card’s bounds probe only when the card intersects the current clip mask.
Reviews (1) · Last reviewed commit: "perf(desktop-gpui): avoid decoding offsc..." · Reviewed by Greptile