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

Renderer freezes after opening 2GB or larger files #42839

Closed
rebornix opened this issue Feb 2, 2018 · 2 comments
Closed

Renderer freezes after opening 2GB or larger files #42839

rebornix opened this issue Feb 2, 2018 · 2 comments
Assignees
Labels
editor-textbuffer Editor text buffer freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues workbench-editors Managing of editor widgets in workbench window
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Feb 2, 2018

  • VSCode Version: Stable/Insiders
  • OS Version: macOS

Steps to Reproduce:

  1. Open a 1.5GB file (with Line Model or Piece Tree)
  2. It opens successfully (say the machine has enough memory)
  3. Open a 2.1 GB file
  4. It freezes after 1+ mins.

As we load the whole file to memory, it exceeds the memory limit of v8 process. We can expose max_old_space_size flag in cli then users can increase the limit themselves.

@rebornix rebornix self-assigned this Feb 2, 2018
@rebornix rebornix added editor-textbuffer Editor text buffer workbench-editors Managing of editor widgets in workbench window labels Feb 2, 2018
@rebornix
Copy link
Member Author

rebornix commented Feb 2, 2018

@bpasero correct me if I'm wrong, but it seems that when we run Code --js-flags="abc", js-flags is not passed to the renderer process so we need to explicitly have this option in cli.

@rebornix rebornix added this to the February 2018 milestone Feb 2, 2018
@rebornix rebornix mentioned this issue Feb 3, 2018
8 tasks
@bpasero
Copy link
Member

bpasero commented Feb 3, 2018

@rebornix it should be passed on to the renderer, e.g. when I add --js-flags=harmony I see how that flag is passed on to the renderer when I check with ps aux. See also https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md

However, if we wanted to introduce a command line option to make this easier for the user, it can be done also programmatically via app.commandLine.appendSwitch (before the on-ready event).

@bpasero bpasero removed their assignment Feb 3, 2018
@bpasero bpasero added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Feb 10, 2018
rebornix added a commit that referenced this issue Feb 14, 2018
Fix #42839. avoid ui freeze when file is larger than heap size limit.
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-textbuffer Editor text buffer freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

2 participants