Skip to content
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

Extension causes high cpu load #3513

Closed
kingluda opened this issue Oct 21, 2022 · 12 comments
Closed

Extension causes high cpu load #3513

kingluda opened this issue Oct 21, 2022 · 12 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@kingluda
Copy link

  • Issue Type: Performance
  • Extension Name: vscode-pylance
  • Extension Version: 2022.10.30
  • OS Version: Windows_NT x64 10.0.19044
  • VS Code version: 1.72.2

⚠️ Make sure to attach this file from your home-directory:
⚠️file:///c%3A/Users/Michael/AppData/Local/Temp/ms-python.vscode-pylance-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

@bschnurr
Copy link
Member

do you have a public code repository? or code example to repro?

@judej judej added the waiting for user response Requires more information from user label Oct 24, 2022
@zzzeek
Copy link

zzzeek commented Oct 25, 2022

I'm also having CPU issues for several days now. This is using the sqlalchemy repository, Fedora linux. It starts out fine then after some minutes builds up to 100/200% of CPU under top and vscode functions like hover, outline, etc. become unresponsive. Closing vscode will often leave the pylance process still running and it has to be manually killed.

I will try to run some of the debugging steps later

@bschnurr
Copy link
Member

r you using pytest?

@rchiodo
Copy link
Contributor

rchiodo commented Oct 25, 2022

@zzzeek can you paste your user settings.json file? I'm trying this now with sqlalchemy and not reproing the issue.

@judej judej added bug Something isn't working and removed waiting for user response Requires more information from user labels Oct 25, 2022
@zzzeek
Copy link

zzzeek commented Oct 25, 2022

settings is attached
settings.json.txt

@zzzeek
Copy link

zzzeek commented Oct 25, 2022

so locally it's not doing it now. It goes away after a restart and sometimes takes awhile before it appears again. I will try to turn on the node.js debugging stuff when it does.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 25, 2022

Thanks, I was finally able to repro. Root cause was this commit:

microsoft/pyright@50e12b4

We should have a fix soon.

@zzzeek
Copy link

zzzeek commented Oct 25, 2022

woah, with my repo? is there a way to make it happen?

@rchiodo
Copy link
Contributor

rchiodo commented Oct 25, 2022

I repro'd after I ran setup.py in sqlalchemy and then started pip installing more stuff into the venv. Eventually it repros on hover.

@rchiodo rchiodo added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Oct 25, 2022
@eioe
Copy link

eioe commented Oct 26, 2022

I'm suffering from the same issue. A quick fix would be so much appreciated from here. 🙏

@tom-mcclintock
Copy link

Also experiencing this issue with poetry venvs. Thanks for investigating @rchiodo!

@heejaechang
Copy link
Contributor

This issue has been fixed in prerelease version 2022.10.41, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

8 participants