Skip to content

Upgrade Vscode 1.51.1. This extension makes CPU usage too high #2468

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

Closed
Ztachi opened this issue Nov 13, 2020 · 27 comments · Fixed by #2474
Closed

Upgrade Vscode 1.51.1. This extension makes CPU usage too high #2468

Ztachi opened this issue Nov 13, 2020 · 27 comments · Fixed by #2474
Labels

Comments

@Ztachi
Copy link

Ztachi commented Nov 13, 2020

Details about the situation

@Ztachi
Copy link
Author

Ztachi commented Nov 13, 2020

I didn't install any more extensions
image
image

@yoyo930021
Copy link
Member

  1. Is this problem in VSCode old version?
  2. What is message in Output panel for Vue Language Server?
  3. Can you give me a tree diagram of your project filename?

@Ztachi
Copy link
Author

Ztachi commented Nov 13, 2020

@yoyo930021
1.The old version didn't pay attention, but the new version has this problem.
2、3.There are no problems with the project and the extension is working properly.But it kept on initializing and using a lot of CPU.
image

@yoyo930021
Copy link
Member

@yoyo930021
1.The old version didn't pay attention, but the new version has this problem.
2、3.There are no problems with the project and the extension is working properly.But it kept on initializing and using a lot of CPU.
image

Giving me information is a better way to determine this issue.
Is this problem in Vetur v0.29.1?

@Ztachi
Copy link
Author

Ztachi commented Nov 13, 2020

@yoyo930021
v0.30.1
vscode v1.51.1
image

@yoyo930021
Copy link
Member

@yoyo930021
v0.30.1
vscode v1.51.1
image

Can you try to use old version extension?
https://github.com/vuejs/vetur/blob/master/docs/FAQ.md#install-an-old-version-of-vetur
I need information for troubleshoot.

@yoyo930021
Copy link
Member

yoyo930021 commented Nov 13, 2020

截圖 2020-11-13 下午12 07 13
You can also use this method for old version extension.

@Ztachi
Copy link
Author

Ztachi commented Nov 13, 2020

截圖 2020-11-13 下午12 07 13
You can also use this method for old version extension.

I installed V0.29.1 and it was able to complete the initialization normally.
I installed V0.30.0 again. I waited for five minutes and it was still initializing and using a lot of CPU.

@yoyo930021
Copy link
Member

截圖 2020-11-13 下午12 07 13
You can also use this method for old version extension.

I installed V0.29.1 and it was able to complete the initialization normally.
I installed V0.30.0 again. I waited for five minutes and it was still initializing and using a lot of CPU.

If you use pnpm or symlink?

@yoyo930021
Copy link
Member

yoyo930021 commented Nov 13, 2020

Can you give me a tree diagram of your project filename?

cd project
npx -p tree-cli treee -l 100 -f -o output.txt -d

provide output.txt file.

@yoyo930021
Copy link
Member

yoyo930021 commented Nov 13, 2020

You can decompress this file and install ext in vscode.
vetur-0.30.1.vsix.zip

  1. Uninstall original extension.
  2. 截圖 2020-11-13 下午3 04 44
  3. Install vsix

@Shinigami92
Copy link

Don't know if it's related, but today I found this:

I closed all VSCode instances an hour ago... but then I found one of my 28 cores was constantly on 99% - 100%

@yoyo930021
Copy link
Member

Don't know if it's related, but today I found this:

I closed all VSCode instances an hour ago... but then I found one of my 28 cores was constantly on 99% - 100%

Can you try to use it?
#2468 (comment)

@Shinigami92
Copy link

Nope 👎 it's not working 😕
Still 99%-100%

I also have installed Vuetify Pug snippet that depends on vetur

@yoyo930021
Copy link
Member

Nope 👎 it's not working 😕
Still 99%-100%

I also have installed Vuetify Pug snippet that depends on vetur

I'm sorry about that.
vetur-0.30.1.vsix.zip
Can you try this?

If not, #2468 (comment)
and output panel in Vue Language Server.

@Shinigami92
Copy link

Only occurs if I open a .vue file in editor-panel

image

https://pastebin.com/FRsNbYcD (will explode after one week 😜)

@yoyo930021
Copy link
Member

@Shinigami92 https://github.com/vuejs/vetur/blob/master/.github/PERF_ISSUE.md

If you can follow the steps here, I'll thank you.
It's obviously not what I had in mind. =_=

@Shinigami92
Copy link

Tomorrow

@Shinigami92
Copy link

Hope I did anything correct
CPU-20201114T111057.cpuprofile.zip

@yoyo930021
Copy link
Member

yoyo930021 commented Nov 16, 2020

@Shinigami92

I try to revert some change.
Can you try these two files for me?
vsix.zip

If it doesn't work, do it for me on one.
https://github.com/vuejs/vetur/blob/master/.github/PERF_ISSUE.md

@Shinigami92
Copy link

  • full not working
  • path not working

even after uninstalling the versions and closing vscode, I need to kill the process

I didn't installed Vuetify Pug snippet this time, so it's not a problem with that

Is it helpful to tell that my .vue files all look like this?:

<template lang="pug" src="./Filename.pug" />
<script lang="ts" src="./Filename.ts" />

When I uninstall the vetur plugin and open a vue file, the problem is not there. So it's definitely vetur


Do you think that a profile will help here? For me it's more a missing shutdown hook or destroy on close or something else
I'm currently just interested in the fix that it don't run anymore when I close vscode completely

@yoyo930021
Copy link
Member

* full not working

* path not working

even after uninstalling the versions and closing vscode, I need to kill the process

I didn't installed Vuetify Pug snippet this time, so it's not a problem with that

Is it helpful to tell that my .vue files all look like this?:

<template lang="pug" src="./Filename.pug" />
<script lang="ts" src="./Filename.ts" />

When I uninstall the vetur plugin and open a vue file, the problem is not there. So it's definitely vetur

Do you think that a profile will help here? For me it's more a missing shutdown hook or destroy on close or something else
I'm currently just interested in the fix that it don't run anymore when I close vscode completely

The profile can help me where's it stuck?
I need a specific function location for further action.
Or provide a repro project. https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md
Otherwise I'm really just guessing.

If you can provide a repro project, we'd appreciate it.

@yoyo930021
Copy link
Member

yoyo930021 commented Nov 16, 2020

@Shinigami92

I think I found your problem.
Can you try this vsix?
vetur-0.30.1.vsix.zip

And then your question is different from the original.
Your problem should have been there for a long time.
The old version doesn't work either.

@Shinigami92
Copy link

I created an empty folder named test
There I created a test.vue file (file was empty)

The problem was not there

Then I copy-pasted

<template lang="pug" src="./Filename.pug" />
<script lang="ts" src="./Filename.ts" />

-> instant 99% core usage
-> the problem occured

IMO the problem has to do something with lang="pug" src="./xy.pug"

@yoyo930021
Copy link
Member

I created an empty folder named test
There I created a test.vue file (file was empty)

The problem was not there

Then I copy-pasted

<template lang="pug" src="./Filename.pug" />
<script lang="ts" src="./Filename.ts" />

-> instant 99% core usage
-> the problem occured

IMO the problem has to do something with lang="pug" src="./xy.pug"

Try this.
#2468 (comment)

@Shinigami92
Copy link

#2468 (comment) WORKING 🎉

@yoyo930021
Copy link
Member

#2468 (comment) WORKING 🎉

It's just a quick fix.
I need to study the context and provide a way to fix it.
Thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants