Repository navigation
perf(desktop-gpui): faster Instant upload tail with far fewer presign requests - #3444
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully 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.
Shortens the Instant upload tail after Stop and removes almost every presign request while recording.
sequenceDiagram participant App as Desktop participant API as Cap API participant S3 Note over App: before, at Stop App->>API: presign thumbnail App->>S3: PUT thumbnail App->>API: presign manifest App->>S3: PUT final manifest App->>API: recording-complete Note over App: after, at Stop par App->>API: presign thumbnail (while re-encoding it) App->>S3: PUT thumbnail and App->>S3: PUT final manifest (reused URL) end App->>API: recording-completeapps/desktop-gpui/src/upload.rs): the first batch presign already returns a URL forsegments/manifest.json, which was never used. Progress and final manifests now PUT to it instead of calling/api/upload/signedbefore every PUT (about one presign every two seconds).createUploadTarget,expiresIn: 1800).ReusableUploadTarget::new).InstantUpload::finish_with_screenshot): the final manifest is authorized first, then the thumbnail upload and the segment finish run together.recording-completestill waits for both, and a failed thumbnail still fails the attempt, which the queue retries exactly as before.Stop tail benchmark
upload::queue::stop_tail_benchdrives a live Instant recording through the real upload queue againstMockCap, with every API call and object PUT answered after a fixed delay on the virtual clock. Times are from Stop. Baseline ismain.recording-complete(main → PR)STOP_TAIL_API_MS=200 STOP_TAIL_OBJECT_MS=80 STOP_TAIL_PAIRS=30 \ cargo test --bin cap-gpui stop_tail -- --ignored --nocaptureThe Instant request budgets in
upload/verify_tests.rsdrop by one presign per manifest, so a return to per-manifest presigning fails them.

Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
Speeds up Instant uploads after Stop.
The latest change sends network errors through the existing retry backoff instead of immediately signing another URL. No new actionable issues were found.
Reviews (3) · Last reviewed commit: "fix(desktop-gpui): back off before re-si..." · Reviewed by Greptile