Skip to content

Extension hangs / freezes VS Code in big folders #85

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

Closed
Yanpas opened this issue Sep 9, 2017 · 7 comments
Closed

Extension hangs / freezes VS Code in big folders #85

Yanpas opened this issue Sep 9, 2017 · 7 comments
Labels

Comments

@Yanpas
Copy link

Yanpas commented Sep 9, 2017

STR:
Download liberoffice master git (git clone git://anongit.freedesktop.org/libreoffice/core), open this folder in VS code. After some secs Vs code is frozen

@zignd zignd added the bug label Sep 9, 2017
@tabayomi
Copy link

Confirming this bug exists. Strangely enough, it only started causing issues for me when I updated to VSCode 1.16. I had it installed and working previously without a problem. After I upgraded, VSCode started to freeze and after about 1min - it would crash.

Here's the odd thing - it only happened when I opened a PHP app repo I've been working with for months without any issues. Other projects didn't cause a crash. PHP project directory is by far the largest though, so that may be related.

Details:
VSCode version: 1.16 and 1.16.1
Platform: Mac OS X Sierra (10.2.6)
Steps to reproduce: For me, opening my really large PHP app.
Other Extensions: JSLint, ESLint, TSLint, PHP Extension Pack

@aeschli
Copy link

aeschli commented Oct 9, 2017

@zignd The problem is that workspace.openTextDocument is used for all css & html resources in the workspace.
The VSCode documentation, unfortunately, lacks to mention it, but opening a text document is costly and has side effects: The document is passed across process boundaries to interested language servers where it is validated. Potentially lots of error markers are generated and end up in the problems view.
I recommend doing the following instead. For each resource:

  • check the already open text documents and, if available, get the contents from there
  • if not, acquire the file content with fs.readFile

If there is a need, we can look into providing additional API in VSCode to detect the language and file encoding. Please file issues! Thanks a lot!

@sandersu
Copy link

sandersu commented Oct 9, 2017

I have the same problem when opening a large angular project.

VSCode version: 1.17.0 (1.17.0)
Platform: Mac OS X Sierra (10.12.6)
Steps to reproduce: For me, opening my really large angular app.
Other Extensions: EditorConfig.EditorConfig, WallabyJs.wallaby-vscode, dbaeumer.vscode-eslint ,donjayamanne.githistory, felipecaputo.git-project-manager, formulahendry.auto-close-tag, liuji-jim.vue, mrmlnc.vscode-postcss-sorting, octref.vetur, robertohuertasm.vscode-icons, shinnn.stylelint, waderyan.gitblame

@erickguan
Copy link

Another confirm with a rather small size C++ project. Hang the main process.

VSCode 1.17.0 on macOS 10.12.6.

egamma added a commit to egamma/HTML-CSS-Class-Completion that referenced this issue Oct 12, 2017
zignd added a commit that referenced this issue Oct 12, 2017
Fix for issue #85 Extension hangs / freezes VS Code in big folders
@zignd
Copy link
Owner

zignd commented Oct 14, 2017

I guess this issue has been fixed in the latest update. Thanks to Erich Gamma for this great pull request #90.

@zignd zignd closed this as completed Oct 14, 2017
@mcquiggd
Copy link

mcquiggd commented Jan 14, 2018

This is still happening for me on Ubuntu 16.04, VS Code 1.19.2, latest version of the extension at time of writing.

With the extension enabled, VS Code will periodically crash, taking out my whole session. Running two copies of VS Code would cause that to happen within seconds.

With the extension disabled, I have encountered no problems over a period of several days usage, multiple instances of VS Code, moderately large projects.

@zignd
Copy link
Owner

zignd commented Jan 14, 2018

Hi @mcquiggd, would be great if you could help me reproduce the crash. If you have some time, could you create a public repository or point me to one that causes the crash to occur? So that I can clone and open it a VS Code workspace.

Another thing, the crash is due to excessive memory consumption?

cvharris pushed a commit to cvharris/HTML-CSS-Class-Completion that referenced this issue Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants