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

Add ability to disable the check on memory usage of language server (Jedi) process #1156

Merged
merged 2 commits into from
Mar 22, 2018

Conversation

DonJayamanne
Copy link

Fixes #1036

@brettcannon @MikhailArkhipov
Added the word Jedi in release notes to be specific (I don't want anyone looking back at these old change log entries to link this language server to our new analysis engine).

Minor change: Moved StopWatch file into common.

This pull request:

  • Has a title summarizes what is changing
  • Includes a news entry file (remember to thank yourself!)
  • Has unit tests & code coverage is not adversely affected (within reason)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

@@ -158,7 +161,9 @@ export class JediProxy implements vscode.Disposable {
// Check memory footprint periodically. Do not check on every request due to
// the performance impact. See https://github.com/soyuka/pidusage - on Windows
// it is using wmic which means spawning cmd.exe process on every request.
setInterval(() => this.checkJediMemoryFootprint(), 2000);
if (this.shouldCheckJediMemoryFootprint()) {
setInterval(() => this.checkJediMemoryFootprint(), 2000);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing setting will require reload I think

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think thats ok, rather than running some code every 2 seconds that does nothing.
I'm assuming only a handful of people would disable this.

@codecov
Copy link

codecov bot commented Mar 22, 2018

Codecov Report

Merging #1156 into master will decrease coverage by 0.18%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1156      +/-   ##
==========================================
- Coverage   72.13%   71.94%   -0.19%     
==========================================
  Files         260      260              
  Lines       11898    11925      +27     
  Branches     2112     2116       +4     
==========================================
- Hits         8583     8580       -3     
- Misses       3192     3221      +29     
- Partials      123      124       +1
Impacted Files Coverage Δ
src/client/common/stopWatch.ts 66.66% <0%> (ø)
src/client/formatters/autoPep8Formatter.ts 95% <100%> (ø) ⬆️
src/client/debugger/Common/telemetry.ts 95.23% <100%> (ø) ⬆️
...erpreter/configuration/pythonPathUpdaterService.ts 25.49% <100%> (ø) ⬆️
src/client/formatters/yapfFormatter.ts 95.23% <100%> (ø) ⬆️
src/client/extension.ts 97.22% <100%> (ø) ⬆️
src/client/telemetry/index.ts 82.5% <100%> (ø) ⬆️
src/client/providers/simpleRefactorProvider.ts 80.64% <100%> (ø) ⬆️
src/client/providers/jediProxy.ts 71.36% <58.82%> (-0.66%) ⬇️
src/client/linters/lintingEngine.ts 90.35% <88.29%> (ø) ⬆️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c8c864...4d04d6d. Read the comment docs.

@DonJayamanne DonJayamanne merged commit 149c066 into microsoft:master Mar 22, 2018
@DonJayamanne DonJayamanne deleted the issue1036WMI branch June 20, 2018 03:19
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lots of wmic process with high cpu usage after upgrading to 1.21
2 participants