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

vs code hangs for while when pressing the tab key for the first time #6816

Closed
M-Zuber opened this issue May 24, 2016 · 9 comments
Closed

vs code hangs for while when pressing the tab key for the first time #6816

M-Zuber opened this issue May 24, 2016 · 9 comments
Assignees
Labels
emmet Emmet related issues

Comments

@M-Zuber
Copy link

M-Zuber commented May 24, 2016

  • VSCode Version: 1.1.1
  • OS Version: Win 10 home

Steps to Reproduce:

  1. Open vs code
  2. Press the tab key
  3. Wait a second or two
  4. Get control back
  5. Go crazy as it won't happen again until a new instance is opened or an indeterminate amount of time has passed
@scottste
Copy link

I've noticed this as well even after doing code-insiders --disable-extensions.

  • VSCode Version 1.1.1-insider
  • OS Version: OS X 10.11.5

@aeschli
Copy link
Contributor

aeschli commented May 25, 2016

@M-Zuber Which view has the focus when you press tab? If it is in an editor, what type of file is it (JavaScript, HTML...)?

@M-Zuber
Copy link
Author

M-Zuber commented May 25, 2016

On a clean open of Code, blank file with focus on the file.
But it happens with almost any extension - js, ts, html, cs

@M-Zuber
Copy link
Author

M-Zuber commented May 26, 2016

Just to reiterate, it happens to me on any type of file - usually only for the first time I press tab after opening vscode (but sometimes also in the middle of working)

@egamma
Copy link
Member

egamma commented May 26, 2016

When it is the tab key and happens on first time, then this is the loading of the emmet node module.

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/emmet/node/emmetActions.ts#L26

or an indeterminate amount of time has passed

however this doesn't explain this, since the emmet module is loaded only once into the renderer process.

@alexandrudima any other ideas what could go on?

@alexdima
Copy link
Member

usually only for the first time I press tab after opening vscode

Yes this is caused by emmet loading the first time it is invoked.

@M-Zuber once the May release comes out you can use the following rule in your keybindings.json to remove that Tab loads and executes emmet:

{ "key": "tab", "command": "-editor.emmet.action.expandAbbreviation" }

Here I am loading emmet (typing tab for the first time in a html file) on my quite powerful desktop at home: 488ms to load.

image

I think the way forward here is to move emmet to an extension, thus the 500ms loading hit will be taken by the extension host.

@alexdima alexdima self-assigned this May 26, 2016
@alexdima alexdima added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label May 26, 2016
@alexdima alexdima added this to the June 2016 milestone May 26, 2016
@M-Zuber
Copy link
Author

M-Zuber commented May 29, 2016

Thank you for the help.
As I use emmet snippet expansion quite heavily (More than once I've built a 30+ char snippet :)), I'll deal with the one time hit.

or an indeterminate amount of time has passed

I played around a bit, and it would seem that it only happens either on first use in a new instance of code, or after leaving an open instance run idle for a while (I leave my machine on overnight most nights). @egamma are the modules cached in any way?

@alexdima alexdima removed this from the June 2016 milestone Jun 30, 2016
@alexdima
Copy link
Member

alexdima commented Mar 2, 2017

emmet loading...

@alexdima alexdima assigned ramya-rao-a and unassigned alexdima Mar 2, 2017
@ramya-rao-a ramya-rao-a changed the title vs code hangs when pressing the tab key vs code hangs for while when pressing the tab key for the first time Apr 2, 2017
@ramya-rao-a ramya-rao-a added emmet Emmet related issues and removed freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues labels Apr 2, 2017
@ramya-rao-a
Copy link
Contributor

#21943 looks into having emmet features come from an extension rather than the tightly coupled in built way it is integrated today.

Closing this issue as the work done in #21943 will have a better user experience.

If #21943 doesn't pan out, then we will get back to see if there is something we can do to improve the first time experience.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
emmet Emmet related issues
Projects
None yet
Development

No branches or pull requests

6 participants