Skip to content
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

Crash when opening a 35MB, 13.7MM lines txt file #13187

Closed
innerlee opened this issue Oct 4, 2016 · 4 comments
Closed

Crash when opening a 35MB, 13.7MM lines txt file #13187

innerlee opened this issue Oct 4, 2016 · 4 comments
Labels
bug Issue identified by VS Code Team member as probable bug editor-textbuffer Editor text buffer freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@innerlee
Copy link
Contributor

innerlee commented Oct 4, 2016

  • VSCode Version: 1.5.3
  • OS Version: Ubuntu

I have a text file with 13765201 lines and each line contains an int range from 0 to 20. It's about 35M. Code crashes when opening it. There are other reports on big files (like #6474), however, unlike in this case, Codes will warn that the file is too large there. The bad part is that you cannot click on the wrong file.

vscode_no_response

Steps to Reproduce:

  1. open a large file like here.
  2. then wait.
@Tyriar Tyriar added freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues editor labels Oct 5, 2016
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Dec 2, 2016
@alexdima alexdima added this to the Backlog milestone Dec 2, 2016
@alexdima alexdima modified the milestones: July 2017, Backlog Jul 7, 2017
@alexdima
Copy link
Member

alexdima commented Jul 7, 2017

Even with the improvements in #30180 this will crash with OOM. The size of the file is not the cause, but the number of lines, where we spend 40-60 bytes (2 objects) to represent a line.

@alexdima alexdima changed the title Crash when opening a 35M txt file Crash when opening a 35MB, 13.7MM lines txt file Jul 7, 2017
@rebornix rebornix self-assigned this Jan 29, 2018
@rebornix
Copy link
Member

With our next text buffer implementation, the metadata memory usage of line breaks decrease significantly. Old text buffer used 800+ MB memory for 13765201 lines metadata, but the new one only uses around 20 MB. As we won't release new text buffer impl this iteration, let's revisit this issue next week.

@rebornix rebornix added editor-textbuffer Editor text buffer and removed editor editor-textbuffer Editor text buffer labels Jan 29, 2018
@alexdima alexdima modified the milestones: Backlog, February 2018 Jan 30, 2018
@rebornix
Copy link
Member

@innerlee we re-implemented our text buffer and the memory usage of loading a file is less. For the file you provided, the metadata for the line breaks is 30MB so we used 75MB in total. The OOM issue should be gone if the system has enough memory.

@rebornix rebornix added the verification-needed Verification of issue is requested label Feb 12, 2018
@alexdima
Copy link
Member

This 13MM lines file now opens fine.

@alexdima alexdima added the verified Verification succeeded label Feb 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-textbuffer Editor text buffer freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants