Vetur: Upgrade Vscode 1.51.1. This extension makes CPU usage too high

Created on 13 Nov 2020  Β·  27Comments  Β·  Source: vuejs/vetur

Most helpful comment

ζˆͺεœ– 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.

All 27 comments

I didn't install any more extensions
image
image

  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?

@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
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?

@yoyo930021
v0.30.1
vscode v1.51.1
image

@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.

ζˆͺεœ– 2020-11-13 δΈ‹εˆ12 07 13
You can also use this method for old version extension.

ζˆͺεœ– 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.

ζˆͺεœ– 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?

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.

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

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%

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?
https://github.com/vuejs/vetur/issues/2468#issuecomment-726565206

Nope :-1: it's not working πŸ˜•
Still 99%-100%

I also have installed Vuetify Pug snippet that depends on vetur

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, https://github.com/vuejs/vetur/issues/2468#issuecomment-726561376
and output panel in Vue Language Server.

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

image

https://pastebin.com/FRsNbYcD (_will explode after one week_ 😜)

@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. =_=

Tomorrow

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

@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

  • 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

* 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.

@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.

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"

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.
https://github.com/vuejs/vetur/issues/2468#issuecomment-727858642

#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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muhajirdev picture muhajirdev  Β·  3Comments

pdanpdan picture pdanpdan  Β·  3Comments

octref picture octref  Β·  3Comments

Dealerpriest picture Dealerpriest  Β·  3Comments

OsterHuang picture OsterHuang  Β·  3Comments