-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Emmet - a perf hooligan? #71381
Comments
Likely the cause of #70371, will investigate. Emmet re-parses the file on each edit to determine which region (html attribute? html attribute value? css-in-html? jsx in ts file? css property?) emmet is in. IMO the proper solution would be either having an API where extensions can figure out regions, but we have decided to not expose TM scopes to extensions. The alternative is to have emmet hook into the on completion visitors of each LS. I remember @ramya-rao-a said there was issues with JS/CSS LS and with completion trigger characters. |
@jrieken When you say "top 5" and "top 20" is this something coming from the users or telemetry or your local usage? @octref Regarding the alternative for emmet to hook into html and css completion providers, we did find good results with html, but not with css. The css language server is not great in identifying the right places where emmet should kick in, especially in in-complete css files. Please see #29113 |
@ramya-rao-a I'll see what has changed. The only one I recall is #68326, but that's related to wrapping not typing emmet abbreviations in general. Thanks for linking #29113 too. I'm also interested in the full list. |
Using In comparison, HTML parser took between 50-100ms. |
@ramya-rao-a Wondering what's the original reason for choosing
|
@octref The issue you linked is to a non emmet problem, can you link the right issue? From what I recall, we had good results from moving emmet completions for html to the html language service. What didn't work out well was the move for css/scss/less etc. And the call we took at the time was that we either move both or none at all. The only caveat with moving to html language service is the problem of how to support emmet completions in non html files |
Fixed link. We can just switch to using the html parser, which seems to be much faster than emmet's, and still keep emmet as a separate extension. |
According to this issue it should be fixed: |
I fixed two major perf issues for emmet. Think those are the most common cases for hangs (completion, tab-expansion). Look forward to see a new list of hooligans. |
The top 5 of extensions blocking the extension host process has a newcomer and that's emmet. In 1.31.1 it was top 20, with 1.32.3 it 2nd with 26037 hangs over 5 seconds. I don't have a profile at hand and I also don't use emmet but looking at its implementation might explain it, esp since it doesn't do things in LSP-style but in-proc, e.g probably slowing everything down when a file is large/huge
The text was updated successfully, but these errors were encountered: