Skip to content

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

Closed

Description

@innerlee
  • 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.

Activity

  1. alexdima commented on Jul 7, 2017

    @alexdima
    Member

    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.

  2. changed the title [-]Crash when opening a 35M txt file [/-] [+]Crash when opening a 35MB, 13.7MM lines txt file [/+] on Jul 7, 2017
  3. rebornix commented on Jan 29, 2018

    @rebornix
    Contributor

    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.

  4. rebornix commented on Feb 12, 2018

    @rebornix
    Contributor

    lizz (@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.

  5. alexdima commented on Feb 27, 2018

    @alexdima
    Member

    This 13MM lines file now opens fine.

  6. locked and limited conversation to collaborators on Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bugeditor-textbufferEditor text bufferfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions