-
Notifications
You must be signed in to change notification settings - Fork 133
Microsoft.Python.LanguageServer excessive resource usage #495
Comments
This project hits a debug assertion:
|
This means instance comparer said new object is the same as one in the hash set but calculated hash codes did not match. Debug only, in release it basically just adds new object. Check what compares types and why hash code comes out different. |
I have similar problem on my Win 10 laptop (16 GB) with latest versions of everything (Anaconda/Python, VS Code, Visual Studio IntelliCode -Preview, ...). Python.Language.Server eventually consumes all available memory at the rate of approx. 500 MB/min. Steps to reproduce:
Same behaviour happens also with other libraries. Because of this I can't use the Intellicode (Preview) feature, but have to revert back to Jedi. |
For me (OP) it's definitely stable memory, high CPU. #479 seems very similar. |
…ization (#517) This isn't a complete fix, but does seem to improve #495 in some cases. Adds back the early MRO return removed in #277, so now large class hierarchies won't over-propagate types (where some of the trouble with fastai happens do to the Transform class). I also optimized AnalysisHashSet a little to do length checks when possible. There are still times when things get caught up comparing unions for a while, but it seems to be nondeterministic.
@KaiLicht I observed a similar problem on the scikit-learn repo. Here is the section of my settings to use the beta version of the language server with VS code and get trace level debug output in the "Python" output view. {
"python.analysis.logLevel": "Trace",
"python.analysis.downloadChannel": "beta",
"python.jediEnabled": false
} |
…set optimization (microsoft#517) This isn't a complete fix, but does seem to improve microsoft#495 in some cases. Adds back the early MRO return removed in microsoft#277, so now large class hierarchies won't over-propagate types (where some of the trouble with fastai happens do to the Transform class). I also optimized AnalysisHashSet a little to do length checks when possible. There are still times when things get caught up comparing unions for a while, but it seems to be nondeterministic.
* Fix #470 (#478) * Fix various common exceptions, log on a failed directory load (#498) * rethrow exception after telemetry instead of disposing * log an error instead of crashing when hitting some exceptions loading files, fix nullref when shutting down without an idle tracker * fix short circuiting of question mark checks to prevent null from being returned * print name of exception instead of relying on ToString * don't use MaybeEnumerate * upgrade message to Show * Mitigate some of #495 via MRO member selection and analysis set optimization (#517) This isn't a complete fix, but does seem to improve #495 in some cases. Adds back the early MRO return removed in #277, so now large class hierarchies won't over-propagate types (where some of the trouble with fastai happens do to the Transform class). I also optimized AnalysisHashSet a little to do length checks when possible. There are still times when things get caught up comparing unions for a while, but it seems to be nondeterministic. * Two path resolution bug fixes - Fix #509: PLS doesn't flag error in a relative import if it is found in another root directory (#519) - Fix #510: PLS doesn't resolve relative paths correctly * Catch exceptions when importing from search paths (#525) * catch exceptions when importing from search paths * retry instead of not found
0.2.16 is now available on beta channel. "python.analysis.downloadChannel": "beta" |
really promising after upgrade to this beta version. |
@KaiLicht commented on Sun Dec 16 2018
Environment data
Expected behaviour
Microsoft.Python.LanguageServer is using a reasonable amount of ressources.
Actual behaviour
Microsoft.Python.LanguageServer is using 100%+ CPU Power which is of course draining my battery very fast.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: