-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
non-blocking upload API (streaming small chunks over WS) #5126
Conversation
@AlexTugarev @geropl @elaihau @lmcbout could you try this PR instead? |
51b1630
to
38f4ea6
Compare
@akosyakov I started to test this PR. I Drag & Drop a 120 Meg file and it went ok
|
Upload happens in 2 phases indexing files and streaming them. Indexing happens synchronously. @lmcbout Do you get
Does it feel slow or reasonable? The issue is that upload share web socket connection with other UI operations. More UI operations you do slower it is. I could try to have a temporary dedicated web socket for it. Not sure whether it is going to help. Maybe it is optimizations which we can do with a follow-up PR? |
@akosyakov I think it the browser was not going offline, the initial settings for indexing would be fine.So setImmediate could solve it. Transferring Theia to workspace ~ 8 minutes. |
Could you clarify against what you are comparing? What time would you expect? |
@lmcbout I've reworked it to use a dedicated web socket. Could you please check how it affects upload speed for you? |
@akosyakov The last commit version (31ae348) does not compile :( |
|
31ae348
to
1e0ca14
Compare
@akosyakov It looks like the last commit ( 1e0ca14 ) is faster in indexing, but still takes time and we can see the "Offfline" on the status bar. What is wrong with this version is the transfer of files, it does not transfer all the files, the progress % is not updated either. |
Also noticed it, i don't handle empty files properly, going to push a fix soon. |
1e0ca14
to
1b59186
Compare
@lmcbout should be good now |
@akosyakov Leaving in a few minutes, I will test it tomorrow |
I've tested with uploading Theia repo (without running yarn) against google drive and this PR in Gitpod. In order to upload to google drive it takes 13m 34s. In order to upload to Gitpod it takes 2m 45s. I would say it is enough. Also there is no such goal as to make upload fast for this PR, but stable with responsive UI during upload. I think it is already achieved, browsers don't crash anymore. I will try to make indexing less aggressive, e.g. read dirs one after another, not in parallel, in order to make UI more responsive. |
I tested the latest change it in gitpod.
in terms of file upload, i would say I am happy with the experience as a user |
@lmcbout @elaihau i've reworked once again with indexing and uploading happens in parallel, so indexing should not create high pressure on the disk anymore. It makes progress reporting tricky since i cannot compute total size without indexing all files, so i report uploaded and total files in additional to the percentage. Please try again. |
@akosyakov Good job @akosyakov |
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 also tested the latest change on gitpod. looks good. thank you !
630b6a6
to
3de1582
Compare
It works really nice @akosyakov! 🎉 Thanks for tackling this! One thing: I would be great to use a temporary filename which is considered as ignored in the navigator as well as for git. Otherwise it reports a lot of changes, as it updates continuously, which leads to a high cpu load. |
@AlexTugarev good point, will have a look |
Just for completeness: the high number of |
Signed-off-by: Anton Kosyakov <[email protected]>
3de1582
to
3b097ac
Compare
@AlexTugarev exclude even reporting for temporary upload files, for git a user will need to add a pattern to gitignore file good to merge? |
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.
Great work @akosyakov!
Upload via streaming small chunks over the web-socket.
It's breaking to redesign APIs. I've updated CHANGELOG with a record for it.