Repository navigation
perf(gpui): prefetch signed URLs during ordered S3 uploads - #3352
Conversation
|
Someone is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Investigated the failed GNOME screenshot check from the full job log and uploaded artifact (the CLI artifact redirect was blocked; the connected GitHub artifact download worked). The exact failed assertion is |
|
Thanks! Can you get CI green? Then we'll take a look. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
S3 multipart uploads wait for each part's signed URL only after the preceding PUT finishes, adding an API round trip per part to transfer latency.
Prefetch one next-part URL while the current PUT runs. Body transfers stay strictly ordered with one PUT and one current payload buffer; chunk reads/replacement verification are unchanged. Drive URLs and Content-MD5/custom uploads keep serialized presigning. Deferred retries request a fresh URL, cancellation drops both futures, and successful PUTs report progress immediately.
Controlled measurements
Full multipart-stage transfers over real loopback HTTP using the existing WAN model, not a production WAN or whole Share/export measurement. Linux AMD EPYC 9V74 host with a two-CPU quota; Rust 1.99.1, release opt-level 3, thin LTO, one codegen unit. Five fresh processes per version and case, alternating order; 100 Mbps modeled link, 20 ms presign service, injected RTT:
At 150 ms RTT, the median falls by 1.85 s (18.0%); observed ranges are 10.28–10.32 s before and 8.40–9.61 s after. All 40 runs preserve received bytes, ordered PUTs, completion part metadata, monotonic progress and a maximum of one active PUT. Single-part controls are unchanged. Candidate TCP connections ranged from 2–3 versus 2 on baseline; those runs are included, and exact socket reuse is not promised. Raw samples, ranges, source snapshots and reproduction.
Verification and risk
cargo check --locked -p cap-desktop-gpui --bin cap-gpui --tests; full GUI tests were not executed.No new dependencies, payload pre-reading or parallel PUTs; the payload-buffer count is unchanged. One speculative metadata request can be discarded on cancellation; source verification still precedes every PUT. The existing ignored multipart network benchmark now includes shared-client serial versus prefetched modes. Reproduce after normal GPUI setup with
CAP_UPLOAD_BENCH_MB=60 cargo test --release --bin cap-gpui multipart_mock_network_benchmark -- --ignored --nocapturefromapps/desktop-gpui.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Prefetches the next S3 part’s signed URL while the current part uploads.
No actionable issues found. This review used source inspection; no builds, tests, or benchmarks were run.
Reviews (1) · Last reviewed commit: "perf(gpui): prefetch signed URLs during ..." · Reviewed by Greptile