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

Investigate high CPU usage on Windows, due to parentProcessStillRunning() #378

Closed
fbricon opened this issue Oct 6, 2017 · 2 comments · Fixed by #460
Closed

Investigate high CPU usage on Windows, due to parentProcessStillRunning() #378

fbricon opened this issue Oct 6, 2017 · 2 comments · Fixed by #460

Comments

@fbricon
Copy link
Contributor

fbricon commented Oct 6, 2017

From https://gitter.im/Microsoft/vscode-java-debug?at=59d57a4101110b72317a3bca :

The issue is that the Redhat extension runs java.exe (eclipse_1624.dll), which continually 
runs cmd.exe, which runs  tasklist.exe and findstr.exe.  This causes high CPU usage.

As @andxu correctly points out, the jdt plugin:

will check task list periodically to find the process which starts it to keep the same
 life-cycle with it, the code is at 

https://github.com/eclipse/eclipse.jdt.ls/blob/98e1e50452d332ba2bbf9050ac1b23f6051ab5ea/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/LanguageServer.java#L53-L57

and
https://github.com/eclipse/eclipse.jdt.ls/blob/98e1e50452d332ba2bbf9050ac1b23f6051ab5ea/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/LanguageServer.java#L28

@fbricon fbricon changed the title Investigate high CPU usage on Windows, due to Investigate high CPU usage on Windows, due to parentProcessStillRunning() Oct 6, 2017
@gorkem
Copy link
Contributor

gorkem commented Nov 10, 2017

We can easily avoid running findstr.

Is removing parentProcessStillRunning check completely an option?

@gorkem gorkem self-assigned this Nov 22, 2017
@fbricon fbricon added this to the End November 2017 milestone Nov 28, 2017
@fbricon
Copy link
Contributor Author

fbricon commented Nov 28, 2017

The parent process check is now only done after 30s of inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants