microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.48k stars 28.97k forks source link

Extension host messages flood and stall renderer #62693

Closed iyashpal closed 5 years ago

iyashpal commented 5 years ago

Steps to Reproduce:

  1. Whenever I edit any file on VS code it stops working. Before last update it was working perfect with the extensions I have installed on my setup. Below are the extensions list that I am using currently.

Extensions Installed:

  1. VS Live Share Extension Pack (https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack)
  2. Vetur (https://marketplace.visualstudio.com/items?itemName=octref.vetur)
  3. TSLint (https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
  4. PHP Extension Pack (https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-pack)
  5. jshint (https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint)
  6. Git extension pack (https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack)
  7. Azure Repos (https://marketplace.visualstudio.com/items?itemName=ms-vsts.team)
  8. Eslint (https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
  9. GitHub Pull Requests (https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github)

Does this issue occur when all extensions are disabled?: Yes/No Yes

jrieken commented 5 years ago

@iyashpal We are really keen on nailing down this issue but we have been unable to reproduce yet. Can you please create CPU profile when things get slow. With that we can get a fix.

To create profile, do this: Hit F1 > Toggle Developer Tools. In the overflow menu select 'More Tools > JavaScript Profiler'. In there select start, let it profile for 30 to 60 seconds, stop it, save it to a file and attach the file here. Thanks.

screen shot 2017-09-28 at 09 44 31
UweKeim commented 5 years ago

@jrieken "able" should read "unable", I guess?

rtemision commented 5 years ago

I have same problem.

Here CPU profile.

jrieken commented 5 years ago

@rtemred Thanks. This is really help. From the profile it seems that VS Code is flooded with IPC messages and has trouble to keep up.

screenshot 2018-11-08 at 09 12 32

This might be related to https://github.com/Microsoft/vscode/issues/62421 and the question is where all these messages are being send from. Potential senders are file watching, search, and extensions. I don't think it search, which leaves extension and file watching.

@rtemred What extension do you have installed (code --list-extension)? Also, do you have some kind of builder running, e.g. webpack-dev-server or something else that would generate loads of file events?

jrieken commented 5 years ago

Ok, this is an extension because only those end up calling deserializeRequestJSONArgs

screenshot 2018-11-08 at 09 21 00

@rtemred Now I am even more interested in your extensions list. Pretty please: code --list-extension

rtemision commented 5 years ago

@jrieken here:

chrmarti commented 5 years ago

@rtemred Try disabling vincaslt.highlight-matching-tag and see if that helps. If it doesn't, try disabling all extensions (start with --disable-extensions or Reload Window With Extensions Disabled).

jrieken commented 5 years ago

We have seen the same profile from @vitorsemeano in #62588 and these are extension both have installed:

jrieken commented 5 years ago

@rtemred, @vitorsemeano what kind of files are you guys editing when this happens? JSX, HTML, CSV? This is while typing and/or moving the cursor, right?

vitorsemeano commented 5 years ago

This happens when i try to select something or write to the file, mostly selecting. I have seen this occurring in php, less, js, etc. When I select some text in a non stop way on some random file it actually blocks the entire vscode for some seconds.

rtemision commented 5 years ago

@jrieken yes it's while typing. File types: js, less - for sure. Maybe postcss - not sure.

I have disabled extension vincaslt.highlight-matching-tag. I will observe how VSC will behave. I will inform you tomorrow. This issue happens after a few hours of work. Then I reboot app. It's happens a couple of times a day.

jrieken commented 5 years ago

Thank guys. Please keep us posted, we are currently looking at and testing those extensions.

yyss8 commented 5 years ago

I'm also having slimier issue and restarting the vsc seems to fix it I usually have 2-3 vsc running at same time with 1-2 terminals opened on each of them and when one of them starts freezing, the rest of vsc still run ok.

here's the list of my installed extensions

and the CPU profile:

CPU-20181108T003312.zip

btw, I've seen that happened while working on .php, .jsx and .js

jrieken commented 5 years ago

@yyss8 What version of VS Code are using here?

yyss8 commented 5 years ago

@yyss8 What version of VS Code are using here?

v1.28.2 for x64, the latest version I think?

jrieken commented 5 years ago

Thanks. What appears to be happening is that for a very long time (18secs) events are fired, from this one trace it looks like it's context keys...

screenshot 2018-11-08 at 17 56 43

This is quite interesting but might unrelated to the behaviour others have been mentioning here.

iyashpal commented 5 years ago

@iyashpal We are really keen on nailing down this issue but we have been unable to reproduce yet. Can you please create CPU profile when things get slow. With that we can get a fix.

To create profile, do this: Hit F1 > Toggle Developer Tools. In the overflow menu select 'More Tools > JavaScript Profiler'. In there select start, let it profile for 30 to 60 seconds, stop it, save it to a file and attach the file here. Thanks.

screen shot 2017-09-28 at 09 44 31

Hi @jrieken sorry for late reply here is the CPU profile. CPU-20181109T161911.zip

While recording the CPU Profile VS Code handed two times and the file I was editing is .vue.

Thanks! Yash

rtemision commented 5 years ago

Today has passed without vincaslt.highlight-matching-tag and this issue has not be.

artdude543 commented 5 years ago

Hello,

I've been having the hanging issue for a while now. Just noticed this issue with it being tracked/looked into.

Today it was hanging a lot and for longer. The only change was hosting a Live Share session, but this also happens outside of Live Share. Hopefully, the profile contains the data your after, this was profiled when I noticed the first lockup, then left it running which it should have captured another 4 after the initial happened. I only use VSCode for Typescript also (if you needed to know the language processor being used)

Profile: CPU-20181109T162001.zip

Enabled Extensions christian-kohler.npm-intellisense
eamodio.gitlens
eamodio.toggle-excluded-files
EditorConfig.EditorConfig
eg2.tslint
eg2.vscode-npm-script
eriklynd.json-tools
maxerbox.vscode-discord
ms-vscode.PowerShell
ms-vsliveshare.vsliveshare
pmneo.tsimporter
rbbit.typescript-hero
tomoki1207.selectline-statusbar
Tyriar.sort-lines
wayou.vscode-todo-highlight
Jandakast.zenscript-vscodelanguage
zz5840.minecraft-lang-colorizer


If you need more details/debug data, I'd be happy to provide!

Thanks.

jrieken commented 5 years ago

@artdude543 thanks for the profile. what you are seeing is https://github.com/Microsoft/vscode/issues/62829#issuecomment-437314957

rtemision commented 5 years ago

Today has passed without vincaslt.highlight-matching-tag and this issue has not be.

I updated this extension (0.8.3), now VSC work fine.

jrieken commented 5 years ago

That's good to hear. Yesterday we have also fixed a pretty bad listener leak which can show this behaviour (see https://github.com/Microsoft/vscode/issues/62970#issuecomment-438683094). Latest insider and the upcoming 1.29.1 release will contain a fix for this.

jrieken commented 5 years ago

closing this has half duplicate and half caused-by-extension