-
Notifications
You must be signed in to change notification settings - Fork 30.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
vscode does not open large files #9832
Comments
@alexandrudima @gregvanl I suggest that we document our approach to large file handling in the FAQ. |
@d180cf VSCode is optimized for editing. There are a great deal of assumptions one can make when creating a log viewer:
These assumptions (read-only, context-independent line coloring) are not assumptions we can make in VSCode since our primary scope is to be an editor for programming languages and not a log viewer. This does not mean we could not be also a good log viewer, it is just not a top priority. Other than that, the only thing stopping us from opening that file is basically getting an OOM exception. |
There could be some large files that needs to be edited, like SQL files, resource files or JSON files. NotePad++ and AkelPad handles them well. |
Hello. I'm working a lot with books and dictionaries in text format (html, xml, sql, others). I do parsing, conversion and editing. VS Code works stable and smooth with files around 10MB, great job MS! How ever from time to time I have to work also with dictionaries with size of 100+MB and cannot do my job in VS Code. It would be awesome to have possibility to do work using one app instead of switching between different apps while working on the same project. Notice: Notepad++ tend to corrupt files with size above few MB !!! |
I agree it would be very useful for VSCode to be able to open large files. Example: I wrote an app in C++ and compile it with Emscripten, which can produce pretty big .js files, depending on code size. Using the VSCode Chrome Debugger extension, we can debug Emscripten applications if they were built with proper build flags (source maps not absolutely necessary). However, if the .js file is several MB, past a certain point VSCode will refuse to open them, so we can't put breakpoints anymore and use VSCode to debug. Interestingly, if you are a tiny bit below the VSCode max file size, it works like a charm. Since there's no good options right now to debug Emscripten apps, it would be great if that limit was a user setting (or just removed) so that we can use VSCode in that scenario. |
I regularly need to inspect large log files. Whilst looking at them I often refer to the source files (C) to help in understanding them. So large file support is important. |
I'm very happy that VSC doesn't crash when opening a large file like the other editors but I would be even happier if it would be possible to still allow the file to be opened in a "stream mode". Basically you can disable the syntax highlight (and maybe other features that would be resource intensive to implement on large files) but open and read the file in chunks of data (what's needed to be displayed on screen) and load more as you scroll (up or down). |
Any updates on this? IMO it's very annoying to have to change the editor or use the terminal whenever I need to check some log. |
A stream mode or a tail/less like experience would be awesome. Any news on that? |
Yes, no need to load all file in memory. And also having syntax highlight disabled is ok. Just being able to open it and "stream trough it" would be perfect. |
Improvements have been made in #30180 , and our memory usage is now roughly:
We will look into removing or raising the limit on 64 bit platforms |
I cant open a file with 60.2 MB and 1.1m lines. |
Possible duplicate of:
|
With the upcoming 1.15, the file size limit has been lifted on the 64bit releases of VSCode. On the 32bit variants, the file size limit has been raised to 300MB. Files over 20MB or with more than 300k lines will be treated especially, and some of the features will be turned off for them (e.g. tokenization, word wrapping, etc.) in order to save memory. |
On a related topic, I am unable to diff two files when one of them is very large. Currently using a 64bit version of VS Code on MacOS. My command line is along the lines of: The files open in a side-by-side locked scrolling method, but I receive a warning notification "Cannot compare files because one file is too large." No diff is performed. In my case, one file is 8.4M and the other is 30M. |
Basically, I tried to open a 250 MB log file and got a message that vscode doesn't support this. vs2015 opened the file in a second.
I like that it didn't hang or crash, like many other editors, but I don't see why opening large log files is a hard problem. Log files generally have a simple structure: a sequence of reasonably long text lines; vscode could detect if the file looks like a good log file and render a part of it that is visible. Obviously, then I'll want all the cool features like regexp search and highlighting, but I believe that this can be nicely abstracted at the fs level.
The text was updated successfully, but these errors were encountered: