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

Consumes lots of memory over time #931

Merged
merged 1 commit into from
Feb 20, 2019
Merged

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Feb 12, 2019

Fixes redhat-developer/vscode-java#789

Java doesn't call the finalize method when terminating a process. Because of that, when Java LS isn't used, it creates a lot of zombie processes on Windows.
See https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/ParentProcessWatcher.java#L64

Steps to reproduce:

handle64 -s -p <Java_LS_pid> | grep Process

You will see that the number of processes is constantly increasing.

The solution is to call System.gc(). We can also call it on Linux and Mac because it runs when Java LS isn't active.

Signed-off-by: Snjezana Peco snjezana.peco@redhat.com

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@snjeza
Copy link
Contributor Author

snjeza commented Feb 12, 2019

@fbricon I have updated the PR.

@fbricon fbricon added this to the Mid February 2019 milestone Feb 20, 2019
@fbricon fbricon merged commit 192d6bd into eclipse-jdtls:master Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants