Skip to content

VSCode very slooow when opening minified css file #94

Closed

Description

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

Activity

  1. bpasero commented on Nov 19, 2015

    @bpasero
    Contributor

    Sounds like out of memory to me.

  2. alexdima commented on Nov 25, 2015

    @alexdima
    Member

    Cannot reproduce on windows (for VSCode master and 0.10.1). We need to check on OSX El Capitan

  3. alexdima commented on Nov 25, 2015

    @alexdima
    Member

    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?

  4. alexdima commented on Nov 25, 2015

    @alexdima
    Member

    Erich Gamma (@egamma) Can you please try to repro on OSX El Capitan

  5. egamma commented on Nov 25, 2015

    @egamma
    Member

    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?

  6. jwulf commented on Nov 25, 2015

    @jwulf

    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.

  7. alexdima commented on Nov 25, 2015

    @alexdima
    Member

    Erich Gamma (@egamma) That must be it!

    Long line with at least one multi-byte character that takes forever to tokenize in posix.

  8. added
    upstream
    bug
    on Nov 25, 2015
  9. seixasfelipe commented on Nov 27, 2015

    @seixasfelipe

    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.

  10. alexdima commented on Nov 27, 2015

    @alexdima
    Member

    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.

  11. added
    freeze-slow-crash-leak
    on Nov 30, 2015
  12. changed the title [-]VSCode crashes when opening minified css file[/-] [+]VSCode very slooow when opening minified css file[/+] on Dec 3, 2015
  13. rjucf commented on Dec 3, 2015

    @rjucf

    +1

  14. alexdima commented on Dec 7, 2015

    @alexdima
    Member

    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.

  15. alexdima commented on Dec 16, 2015

    @alexdima
    Member

    Isidor Nikolic (@isidorn) This is the long line with multi byte characters case that you also hit some time ago

  16. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfreeze-slow-crash-leakupstreamverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions