You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VSCode very slooow when opening minified css file #94
bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
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
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?
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?
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?
Felipe Seixas (@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.
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.
bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
Activity
bpasero commentedon Nov 19, 2015
Sounds like out of memory to me.
alexdima commentedon Nov 25, 2015
Cannot reproduce on windows (for VSCode master and 0.10.1). We need to check on OSX El Capitan
alexdima commentedon Nov 25, 2015
Dina Berry (personal) (@dfberry)
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?
alexdima commentedon Nov 25, 2015
Erich Gamma (@egamma) Can you please try to repro on OSX El Capitan
egamma commentedon Nov 25, 2015
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?
jwulf commentedon Nov 25, 2015
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.
alexdima commentedon Nov 25, 2015
Erich Gamma (@egamma) That must be it!
Long line with at least one multi-byte character that takes forever to tokenize in posix.
alexdima commentedon Nov 25, 2015
The problem is in atom/node-oniguruma, more specifically:
https://github.com/atom/node-oniguruma/blob/master/src/onig-searcher.cc#L11
going into
https://github.com/atom/node-oniguruma/blob/master/src/unicode-utils-posix.cc#L38
which makes tokenizing strings with multi-byte characters O(N^2) under posix
seixasfelipe commentedon Nov 27, 2015
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.
alexdima commentedon Nov 27, 2015
Felipe Seixas (@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.
[-]VSCode crashes when opening minified css file[/-][+]VSCode very slooow when opening minified css file[/+]rjucf commentedon Dec 3, 2015
+1
alexdima commentedon Dec 7, 2015
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.
alexdima commentedon Dec 16, 2015
Isidor Nikolic (@isidorn) This is the long line with multi byte characters case that you also hit some time ago