-
Notifications
You must be signed in to change notification settings - Fork 133
Language server hangs on analysis stage #1834
Comments
This should be fixed by #1757 in 0.5. Could you try daily "python.analysis.downloadChannel": "daily" |
This doesn't help. I've not seen in log exceptions but [Analyzing in the background, 3 items left ] not changed for infinity time. New log here https://drive.google.com/file/d/1Wi_J4iPq1A3hpoY3KeK8ry0ymoGR7-bl/view?usp=sharing |
@MikhailArkhipov I think that it depends on my imported libs because it hangs not always (always on my working repo, wich huge). How could I get a debug the Language Server to understood on which file it catches the infinity loop? |
It certainly does depend on libraries. However, it does not necessarily means hang. Sometimes it is a stuck message or analysis completes except couple of modules. Is CPU still getting consumed? Does any editor functionality (hover, completions) are available? |
Yep, it is continuously consuming CPU. What could I do from my side to help improve PLS? hover works well, the outline is shown for files except one from which I've started (if start editing file it also fills outline section), completions work well (on current version 0.5.7, on early versions I experienced a problem with it). |
Analysis would consume quite a bit more than 1.3%, it runs multiple tasks on multiple cores. Generally LS is not inactive when there is at least some activity in VS Code. Typing re-runs analysis incrementally on changed files and its dependents. Hover also cost a bit of CPU although not much. Or does it spike to 10-20% or higher? |
If it's VS Code itself, then it's probably out of our control. You should be able to go into "Help > Open Process Explorer" to see what part of VS Code is using the CPU. |
I've done some exploration and discovered that if I open just part of my workspace (separate folder - for example) everything works. The process explorer does not show anything interesting. (On screenshot I've just started VSCode in problem workspace with opened problem file, [Analyzing in background, 2 items left...] - infinitely showing. |
Based on that screenshot, htop is saying that it's the GPU process that's eating CPU. I really don't think that can be related to something that the LS is doing; we can't do anything about VS Code's CPU usage. The only thing we can look into is the hanging you've reported. The only thing I can see in your logs is a reload during the analysis, so I would also consider setting |
Sounds like electron issue to me. I'd suggest reporting to vscode repo, there are some CPU/GPU issues there. |
File watch turned off by default in #1841. |
Environment data
Expected behaviour
Works
Actual behaviour
Doesn't work
Logs
Full log
[Info - 10:44:22 AM] Analysis cache path: /home/pz/.cache/Microsoft/Python Lang - Pastebin.com
Code Snippet / Additional lnformation
The text was updated successfully, but these errors were encountered: