-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Web: improve the experience for large file uploads #83565
Comments
My understanding is that we are using streams. |
@steven166 in #97347 you first showed a solution using streams and unfortunately I cannot see that commit anymore. Can you share it again or point me to the docs? I cannot really see how to read from a Bottom line, I wonder if the stream based file handling would help in this case. |
Had it ready, but forgot to create a pr... Will resolve those merge conflicts. |
via 203508d I tested with a 2GB file and it worked. |
@bpasero I tried uploading a 2GB file on MS Edge, Windows. It was hanging/processing for a couple of minutes and then just blew up. The
I was uploading a 2.6GB file. After those two minutes, all I had was 4KB transfered. |
I only tried on macOS so far and only running locally. Just verified that I could upload a 5MB file to Codespaces at least. I think we can probably leave it as that, I doubt this is a use case. If someone wanted to upload something very large to a Codespace, I would think it would be via Nevertheless, you can also run |
If you can only upload small files, then it is the same as the old situation and there might be an issue with the streams implementation. I think there are real world use-cases where people just want to upload large files from their local machine into a remote workspace. I hit this limitation myself when I wanted to upload a database dump for example. |
One issue I immediately hit is that a reconnection dialog appears when uploading a large file. It is possible that the pressure the upload puts on the web socket connection makes the client believe the server is gone because afaik it uses a simple ping-pong check to see if the server responds. Possibly the upload needs to throttle itself to avoid that from happening. I think it would be great to validate these cases against an online hosted solution and not locally because that is the scenario we are after. As I said, I could upload a 5 MB file just now. I do not see the 4GB case any pleasant with the current experience because we are not rendering any progress detailed enough to know what is going on. E.g. I would think the throughput and status should be visible for very large file uploads. |
Maybe better to reopen this issue and really think about the missing points for a good experience:
|
I experienced the reconnection dialog myself, but after my implementation of streams in #98248 this was resolved. Therefor I suspect that the stream is somehow still loaded as a whole in memory. |
I have a todo item to look into our use of streams, I too realised that the solution puts a lot of pressure on the browser because the stream is being written to without waiting for it to write to the target. I plan to fix that next week and still think that the stream based solution is more elegant. But we can revalidate this once I pushed the changes. PS: maybe a combination of your solution together with my stream based approach would be possible too. I can take a look. Your solution had the advantage that the slice of |
Verification:
|
Question: is there an option to upload files via the right-click-menu or does it only support drag and drop? |
There is only drag and drop currently. |
Check: #83565 (comment)
Outdated:
Steps to Reproduce:
dd if=/dev/zero of=file.txt count=1024 bs=8388608
creates an 8GB file)I'm guessing we need to support some kind of streaming, I notice most files get uploaded in a single websocket frame (and supposedly loaded into memory). Chrome might not like us loading or sending very large files this way.
Does this issue occur when all extensions are disabled?: Yes
Ref: #83225
The text was updated successfully, but these errors were encountered: