-
Notifications
You must be signed in to change notification settings - Fork 52
Studio Sync: Implement resumable uploads for sync archives #2167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Studio Sync: Implement resumable uploads for sync archives #2167
Conversation
📊 Performance Test ResultsComparing 4823c56 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
| @@ -1,8 +1,17 @@ | |||
| import * as Sentry from '@sentry/electron/renderer'; | |||
| // @ts-expect-error - Uppy types require newer moduleResolution, but types exist at runtime | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to look into how we can resolve this typescript error. The tests are also failing because of this.
2a6fddf to
1a68a50
Compare
|
@gavande1 thanks for taking the spike into the implementation. I haven't had a chance to test and review PR yet, but I wanted to share some thoughts on the UX. Currently, it supports automatic resuming when an internet connection is lost. It's a valid use case, and it's the most common. I'm curious how close the Tus brings us to adding more, e.g.:
Also, should we at least include the last one in this PR? Or would you treat this PR as a technology change that transparently handles temporary broken connections, and then work on UX improvements separately? |
The point of that change was to speed up uploads. Even if we adopt a new technical strategy with this PR that may bring performance benefits in and of itself, it remains true that uploading the archive from the renderer process adds significant overhead since the entire archive must be stored in memory (currently a maximum of 2GB, soon to be 5GB). I suggest researching ways to keep the upload running in the node process and to read the file as a stream, instead of storing the archive contents in memory. The uppy events ( If uppy doesn't support uploading streams directly, then the tus-js-client library (which uppy wraps) appears to do so (see API docs). |
Related issues
Proposed Changes
/studio-app/sync/importnetwork request from node process #1972 as uploading happens in frontend.Testing Instructions
git checkout branch -- filenamesfor applying changes from two branches.public-api.wordpress.comand make it inFULL ACCESSmode.npm install & install startCleanShot.2025-12-02.at.18.44.24.mp4
Additional checks:
Pre-merge Checklist