-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
High CPU usage when pow
function exists in code
#1087
Comments
In general it seems like the performance has slowed down greatly. For example, even import json
f = open("msg.json", "r")
msg = json.load(f) takes sometime to load (~30s), but the pow was the most extreme case. So it might be a symptom of a larger issue |
OK, I think I found the culprit after spending a bunch of time messing with the settings. The issue goes away when I set |
coc-pyright uses |
I also am encountering the same issue with latest coc-pyright, spent like a day trying to figure out what is going on, indeed, something like a single |
Has there been any report to the Pyright maintainers with specifics of what exactly is taking so insanely long? I was unable to find any mention of |
@Krzmbrzl it's I haven't reported this to the Pyright repository because the function is internal and coc-pyright used this in a hack way. Pyright uses |
Issue
CPU usage increases dramatically when there is a pow function in the code. The specific process seems to be this one
../start/coc-pyright/node_modules/pyright/langserver.index.js--node-ipc--clientProcessId=xxxxxxx
.During this time, the CocAction
doHover
cannot be called. CPU usage can stay high for 3+ minutes before it seemingly resolves,doHover
functionality is restored, and the parameter inlay hints are displayed.Minimum reproducable steps
Hopefully it's not just me. May also be an upstream issue, but I'm not sure.
Afternote: Also happens with
pow(1,1)
What's the output of
:CocCommand pyright.version
coc-pyright 1.1.365 with Pyright 1.1.365
What's the output of
:CocCommand workspace.showOutput Pyright
This was captured moments after opening the file. If I wait for it to resolve, then the output is 6000+ lines long, so I won't post it unless asked
The text was updated successfully, but these errors were encountered: