-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
VSCode very slooow when opening minified css file #94
Comments
Sounds like out of memory to me. |
Cannot reproduce on windows (for VSCode master and 0.10.1). We need to check on OSX El Capitan |
Just to rule out there's nothing else in your folder interfering (having JS files might cause a lot of memory pressure). Does VSCode crash when you open a new window of VSCode (without any folder - purple status bar) and open just this file? |
@egamma Can you please try to repro on OSX El Capitan |
I can repro this on OS X. VS Code hangs. Before it hangs I could observe some activity in the tokenizer. Could this be a dupe of a bug you showed us some time ago. Where there was some funny unicode character in the text and then Oniguruma becomes very inefficient on OS X? |
Electron Helper CPU usage goes up to 100%. Memory is not the issue. Opened in a new window. Looks like it's biting off more than it can parse. |
@egamma That must be it! Long line with at least one multi-byte character that takes forever to tokenize in posix. |
The problem is in atom/node-oniguruma, more specifically: which makes tokenizing strings with multi-byte characters O(N^2) under posix |
I have the same problem having 99% cpu editing an js file. Electron Helper on top of consuming process on my MacOS Yosemite. Anyway to avoid that? Any kind of useful info that I could provide here? BTW, VSCode never crashes here. |
@seixasfelipe Will try to raise awareness and possibly contribute a PR to atom/node-oniguruma. The problem occurs on mac or linux when there is a long line with multi-byte UTF8 characters. |
+1 |
Submitted atom/node-oniguruma#46 that addresses the slow tokenization of long strings with multi-byte characters. Until they accept the PR, I have published a forked module on npm and adopted it in 0f49124 . Tried out the original CSS file and the file now opens fine on linux. |
@isidorn This is the long line with multi byte characters case that you also hit some time ago |
Mac OS X El Capitan, 10.11.1,
VSCode 0.10.1
css file size: 116,198 bytes (119 KB on disk)
The attached file was built with a minifier as part of a grunt task to build the distributable files of a website. Tried to open the file several times to make sure that file is the issue. The app eventually shows a dialog that says "Visual Studio is no longer responding"
When I reopen VSCode after the crash, the folder has been forgotten, it opens to a different folder. When is the "current" folder updated to the existing folder?
I added the .txt extension in order to add it here. The file extension was originally just .css
main.08642f99.css.txt
The text was updated successfully, but these errors were encountered: