-
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
[editor] Opening a big binary file crashes the whole backend #3859
Comments
And a zip file as well. I think there are at least two problems relating to this issue:
Also, consider:
|
that's a bit tricky, we either have to redesign |
It might be easier to use vanilla HTTP, since there are APIs to do that kind of streaming. Maybe we could even load every file like this. Although I wouldn't know how to plug the monaco editor to such a stream. But it will be nice to load the chunks progressively in the editors too and not just buffer while transmitting. |
As far as I know monaco has to keep the whole document in the memory and it is very likely to crash the browser. Looks limiting the size of a file which can be opened is most reasonable. cc @svenefftinge |
I think we should have a configurable limit at which the user gets asked before the file is actually opened. I.e. something like:
|
It should be easy to achieve after #7908 |
This happens all the time.
Files that are larger than some (configurable) limit should not be opened directly or maybe on a double click. |
What should be the default max file size in the browser context? |
I think 5 MB would be more than enough in most use cases and when I open a 5 MB file, it still opens quickly without freezing the UI. I also tested with 10 and 15 MB files and this would still be ok but the lag gets bigger. I'm using Theia IDE with GitPod on a Chromebook. |
Crash log:
On the other hand VS Code does manage to open such big files (123.73MB), even though at first it will tell you that it doesn't know how to properly render it:
But once you do open it, VS Code seems to be optimizing things so that it doesn't die like Theia do:
The text was updated successfully, but these errors were encountered: