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

VScode unstable editing a very long CSS file #10345

Closed
druellan opened this issue Aug 9, 2016 · 5 comments
Closed

VScode unstable editing a very long CSS file #10345

druellan opened this issue Aug 9, 2016 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@druellan
Copy link

druellan commented Aug 9, 2016

  • VSCode Version: 1.4.0 / 1.5.0-insiders
  • OS Version: Windows 7 64bits / Windows 10 64bits

I'm editing a very long ~11.000 lines CSS file (attached), and VSCode is behaving surprising well, but I've found some problems:

global.zip

1- TAB insertion is very slow, every time I push TAB the editor halt for about 1 second.
2- Sometimes the editor becomes unresponsive, and a popup instructs me to close or restart
3- Sometimes seems that only Monaco halts. I can change tabs, etc, but I can't edit any file.

That usually happens when I'm editing near the end of the file. Extensions make things worse, but I can reproduce the problem without any extensions.

To reproduce: try to type fast and use TAB and ENTER as much as possible. CTRL+S from time to time. In my tests I can hang the editor just hitting TAB and ENTER like a maniac.

I'm really "ok" about some slowness giving the size of the file, but I believe that the editor should try not to hang and lose the user work.

2016-08-09 10_24_58-program manager

@jrieken jrieken added editor freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues labels Aug 9, 2016
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Aug 9, 2016
@jrieken
Copy link
Member

jrieken commented Aug 9, 2016

The time is spend in emmet

screen shot 2016-08-09 at 17 34 08

CPU-20160809T173241.cpuprofile.zip

@egamma egamma added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Aug 11, 2016
@egamma
Copy link
Member

egamma commented Aug 12, 2016

@druellan you can disable emmet completions on tab using the setting emmet.triggerExpansionOnTab.

@druellan
Copy link
Author

@egamma perfect. That seems to fix the problem for now.
I have the feeling that emmet should be disabled by default, it is more related to the user coding style than the actual code IMHO.

@egamma
Copy link
Member

egamma commented Aug 16, 2016

@druellan changing a default is always challenging since users are now getting used to have emmet available out of the box.

Another option would be to add a setting to define the file size when emmet should be disabled and choose a decent default for this setting, e.g., 1000 lines.

@egamma egamma added the emmet Emmet related issues label Dec 15, 2016
@ramya-rao-a
Copy link
Contributor

This is fixed with the work done as part of #43470

We now parse only a small section around the cursor, instead of parsing the complete file when expanding emmet abbreviations

@vscodebot vscodebot bot locked and limited conversation to collaborators May 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants