-
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
VS Code fails to open big files (60MB) #6474
Comments
We have made some improvements to the way we read files / create buffers. To investigate if we can raise the max file size limit. |
nope, no luck ... dies somehwere between 50 and 55Mb file size (still testing with UTF-8 sql dumps). I think you should reconsider the base of the file handling, so it does not depend on the file size at all (same goes for the lines length, btw. which are causing me troubles too). |
Any updates on this one @alexandrudima |
Same here. VSC version 1.4.0 fails to open my 53MB csv data file. Besides this issue, I like VSC more and more. Congrats ! |
@oscar6echo Yup, I must admit I also like VSC more, but sublime handles large files and long lines better, plus killer fast startup. So, If VSC needs urgent improvements, these are :
|
It's frozen when I load a 500K file. I'm using the latest VS code. |
@zh-wowtv Please create a separate issue and also attach the file that causes the freeze or a file similar in shape or nature that reproduces the freeze you're experiencing. I'm very interested in such cases, but each one is unique. |
I hit this with a 130MB log file. Vim and Notepad++ open this without any problem, and searches it just as fast as a shorter file. |
more than 50m,vs code throws |
@alexandrudima
so vs code only open <= 50M files open and replace this files
find number but i test the 223M log file , vs code is dead ,and i have to kill that . open the same log file , vscode use more than 1.5G memory and nopad++ only 470M memory |
What are the downsides of simply increasing that constant? |
@pfmoore may be the big txt file make the system slow . so declare the |
OK, so it does need better coding internal to VS Code to support this :-( |
The file size limit is somewhat arbitrary. Its sole purpose is to avoid OOM exceptions which lead to a crash. i.e. in our runtime (javascript) we cannot simply catch an OOM exception and stop loading a file, an OOM exception will crash the renderer process. There are three possible "fixes":
|
Thanks for the explanation.
I imagine you've already done a pretty good job with this, so improvements here are probably minimal.
A better heuristic here would be good. I appreciate that opening 20 50MB files is going to hit memory issues, but that shouldn't mean that I can't open one. Would it not be possible to track usage at some level, so that if I open a 150MB file, it's "charged" to me the same as if I opened 3 50MB files? Then the limit could be expressed in terms of how much memory I'm actually using, rather than worst-case predictions. With the current arrangement, it sounds like I could still provoke a crash by opening many medium-sized files.
That would be useful. While it's all very well saying that opening a 150MB file shouldn't hit memory limits, the reality is that it does, and going 64-bit seems like a way round that. (Again, I presume it's not quite as simple as that, though, or you'd have done it already!) But I'm sure you've thought through this sort of thing in great detail, If you're faced with the potential for the runtime to just crash on hitting memory limits, that's something you have to take into account (losing data in an editor is bad 😞). At the end of the day, this is a code editor and 50MB files are almost certainly not source code. But while I don't know about other people, I tend to use my editor for looking at all sorts of text files, so it gets stressed way out of its actual designed use case. Hmm, one probably impractical thought - could there be a readonly mode for opening files that doesn't keep the file content in memory, as it's not going to be changed? That could be used by default for files over a given size. Of course having to read data from disk all the time might make things dreadfully slow, and the alternative data format would likely have massive effects on the rest of the code, which would have to be updated to work with the new format. I doubt this is a realistic option. Anyway - sorry for rambling, and thanks for taking the time to explain the issues involved. |
@alexandrudima Thanks for the explanation.
but wiki/How-to-Contribute#packaging seems only support win32 not win64? |
@anjia0532 Yes, please upvote #507 -- there is no technical limitation AFAIK |
64bit version is a good idea, but I'm still wodnering how SublimeText handles big files so easily. |
When we're talking about huge files, there's no need to process it whole. Typically only the part visible to user (+- page) is processed. I'd prefer that syntax highlighting or other parts depending on tokenization be disabled, but file will still be displayed and operable. Lack of this feature forces me to use other editors. |
@alexandrudima Creating one object per line is fine, as long as you don't try to do it for the whole file at once. Perhaps doing 1000 lines at a time, and then read the next 1000 and releasing the last 1000 once the user jumps/scrolls there? (With some overlap.) |
Any to do list for this? Is there anyone consider make js work on top of OS rather than on chromium hehehe... |
I'm on Windows 10. When I open a 27MB file it opens, but as soon as I try editing it, the window crashes. |
|
I'd give you a laugh emotji, If it wasn't so sad ... |
Applause for VS code 👏 👏 ✌️ |
@faustinoaq Then what the Vs code for ✌️ 😆 |
I don't know anything about the inner workings of vscode, but the solution mentioned by @ivanfateev and @lionello seems most logical for me: |
Won't open a 51 939 KB file 😟 |
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 |
The size has been raised for 64bit vscode on windows. You can try out the 64bit insiders version or wait until we release stable in the following week. |
I can confirm. Tried the 64bit insiders with a 177MB SQL file - opened and opened reasonably fast. |
how to download 64bit? build by myself? |
No just download from the official download page select the 64bit version.
Done.
Benyamin Limanto
sent from my ASUS FonePad 8
Pada tanggal 3 Agt 2017 15.22, "anjia0532" <[email protected]>
menulis:
… how to download 64bit? build by myself?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6474 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACr9NEOdARpktdohRW3_2zZN_-foUay8ks5sUYNBgaJpZM4Ig_ra>
.
|
@benyaminl thanks for your reply and I tried opening a 283 mb json file . in this demo vscode use 6 process and more than 500M memory. the nopad++ not open this file. sublime text 3 build 3126 use 1 process and more than 700M memory. |
Errr. The 64bit now ha the stable version. I think you should check it.
Hehehe...
Benyamin Limanto
sent from my ASUS FonePad 8
Pada tanggal 3 Agt 2017 23.19, "anjia0532" <[email protected]>
menulis:
@benyaminl <https://github.com/benyaminl> thanks for your reply and I tried
opening a 283 mb json file . in this demo vscode use 6 process and more
than 500M memory.
[image: vscode]
<https://user-images.githubusercontent.com/15098916/28931715-888fb086-78a9-11e7-88fb-0594d1978884.png>
the nopad++ not open this file.
[image: nodepad]
<https://user-images.githubusercontent.com/15098916/28931850-14adbfd6-78aa-11e7-95b7-dcb710b15580.png>
sublime text 3 build 3126 use 1 process and more than 700M memory.
[image: sublime]
<https://user-images.githubusercontent.com/15098916/28931971-810d8044-78aa-11e7-8b7f-9e3446fc8dfa.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6474 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACr9NKvi9QmuZmk3EIpR0lq_Lw0Yi1Opks5sUfMngaJpZM4Ig_ra>
.
|
if i use the stable vscode 64bit it's failed to read this json file. but insider vscode 64bit can be read |
Okay, it seems they still working on it.. Then Ok. Just wait for the new version released, Great!
Benyamin Limanto
sent from Windows Live Mail on Windows 7 (Asus A43SV)
From: anjia0532
Sent: Friday, August 04, 2017 8:10 AM
To: Microsoft/vscode
Cc: Benyamin Limanto ; Mention
Subject: Re: [Microsoft/vscode] VS Code fails to open big files (60MB) (#6474)
if i use the stable vscode 64bit it's failed to read this json file.
but insider vscode 64bit can be read
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: