-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Tab key is extremely slow on medium-large files when emmet.triggerExpansionOnTab is enabled #71996
Comments
I have the same problem with latest vscode. |
@octref Tried today's insiders build. Nothing is changed. I opened a html file with 3700 LOC, enabled Also, it can be not a duplicate of #70371 because in #70371 there is no high CPU load and there users try real emmet expansions. This bug on other hand not about emmet expansion, but about pressing TAB key on empty line (where emmet should not trigger at all). Not only on empty lines I must say, but on non-empty lines too. It also has nothing to do with HTML. I tried to open a large PHP file and it has same problem. VS Code version: Code - Insiders 1.37.0-insider (cf03ea3, 2019-07-30T07:15:22.972Z) System Info
|
It's not in insider yet. Wait a bit. |
Is a bit - you mean we have no chance to resolve this critycal for developer problem?) I loved vscode and developed several extensions, but now i start thinking about sublime text 3 again. |
It's already resolved.
You can either build from source or wait for another release of Insiders version coming out this afternoon. |
I downloaded a fresh copy of VS Code Insiders (I inlcuded version and commit hash on bottom of this message) and still nothing changed. As I see, the commit 99d5ff9, that fixes #70371 is from PR #78207 and it is already included in insiders build (at least it is below of the current commit of downloaded build on master branch. The Insiders build is built from master, right?). So, if you meant that this commit should fix this issue, it doesn't, unfortunately. :-( I record a video to show what it looks like: vc-code-slow-tab-and-high-cpu-usage2.zip. On 00:18 I pressed TAB key several times in a row and only on 00:43 the editor finally rendered all these spaces (in my case 4 spaces instead of "tab" character). Throughout its 25 seconds VS Code consumed 100% of a single CPU core, trying to render 10 TABs (I know, that it actually consumed the cpu for something else (Emmet I think), it's just a simplification). VS Code version: Code - Insiders 1.37.0-insider (d5900c6, 2019-07-31T05:24:41.973Z) System Info
enabled |
I'm on d5900c6 and here's what I see in a 5k line HTML file: Whereas this is stable: NVM, I just realized that your bug is you are having "emmet.triggerExpansionOnTab" and expanding on empty lines, whereas the bug I fixed was for |
This is indeed a bug, thanks for narrowing it down to the setting for me to turn off to at least live while it's being worked on. |
I made a cheap improvement, which is to disable expansion if the previous character is space or tab. For example |
I'll switch to our html languageservice parser for December. |
@xak2000 @andremacola @medzhidov does this issue occur for you in the latest vscode? |
Don't worry, i started use PHPStorm, so this bug can be leaved for another one year =) |
@rzhao271 I checked out the file But I managed to reproduce the issue in other way.
(the And what is worse: cursor will be moved back into the position of the file when you held TAB (after first |
\closedWith 15ba9ae |
Issue Type: Bug
When I open a large file (tried on
.php
and.html
) andemmet.triggerExpansionOnTab
option is enabled, then each pressing on TAB key (even on blank line) make my computer hung for about 1-2 seconds (depends on file size) with high CPU load.This is true with current 1.33 version of VS CODE, with or without extensions (tried with
code --disable-extensions
), with or without project open. I also tried to download 1.34 insiders build and the behavior is still the same.Steps to Reproduce:
Download a fresh 1.34 insiders build (or use 1.33 current).
Create new HTML file
tmp.html
with any content. Make sure it is 2000+ lines. Better 5000+ - the hang is more obvious when the file is more large. I attached an example file here.Set cursor on any line and press TAB. You can press it many times in a row or press and hold - all should be fine.
Open
preferences
and enableEmmet: Trigger Expansion on Tab
option (emmet.triggerExpansionOnTab
).Return to opened file and try to press TAB again. You should see a very notable delay between pressing the key and moving the cursor (you can enable
Toggle render whitespace
option to see this better).If you press and hold the TAB key for about 5 seconds, then you should see no spaces/tabs characters entered (but notice high CPU load), you then can move cursor to anoter place in the editor, and after another 10-30 seconds have been passed (all that time with high CPU load), the delayed space characters will appear at the current cursor position (not where the cursor been when you actually pressed the TAB key).
So here is two problems:
I notice this problem only recently. I'm not sure with which build this comes in (not used VS Code recently), but 1-2 month ago there were no this problem.
VS Code version: Code - Insiders 1.34.0-insider (56f1b47, 2019-04-09T05:19:45.294Z)
OS version: Windows_NT x64 6.1.7601
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: