java server refreshing the workspace for each restart on Windows #880
java server refreshing the workspace for each restart on Windows #880snjeza merged 1 commit intoredhat-developer:masterfrom
Conversation
src/javaServerStarter.ts
Outdated
There was a problem hiding this comment.
VS Code doesn't kill Java LS server anymore. See microsoft/vscode#35196 and https://github.com/Microsoft/vscode-languageserver-node/blob/master/client/src/main.ts#L418
|
Restarting spring-boot workspace, I see the shutdown doesn't complete, and the workspace is still not properly saved: |
Could you test with https://raw.githubusercontent.com/snjeza/vscode-test/master/java-0.43.1.vsix ? |
|
This is on another workspace, but this looks much better, shutdown takes several seconds to complete, but does complete with your special build: |
src/javaServerStarter.ts
Outdated
There was a problem hiding this comment.
watchParentProcess is always present, as per L78
There was a problem hiding this comment.
This code is called before the prepareParams method (L78).
There was a problem hiding this comment.
@snjeza , why do we need to set detatched to true only on Windows ? Does https://github.com/microsoft/vscode-languageserver-node/blob/e7b7e3134791c4208165aa57fb9182895df8ec6c/client/src/node/main.ts#L201 just work on Linux/MacOS ?
There was a problem hiding this comment.
Yes, it just works. I think it is the default on Linux/Mac.
|
@fbricon @snjeza Could this change microsoft/vscode-languageserver-node#485 fix the parent watching process issue? |
|
I have updated the PR. |
|
@snjeza I tested this change on Windows and observed that after reloading the window, the message One question: I think the key point is |
We could set it as the default. It will not run tasklist (on Windows) or kill (on Linux/Mac)t after eclipse-jdtls/eclipse.jdt.ls#2115 |
|
@jdneo @snjeza How does this change solve the issue on Windows, with only defaults if |
|
@rgrunber you should set |
|
If this helps the situation, then I'm fine with merging. I just don't see how it would benefit the issue without users also overriding the default |
See #880 (comment) |
|
When I tested this change, I manually changed the vmargs. @snjeza Could you help me understand the relationship between |
We have disabled
|
Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
jdneo
left a comment
There was a problem hiding this comment.
I tested on the Windows machine.
Opening eclipse.jdt.ls project:
- Without the change, takes around 60s
- With the change, it takes around 30s.
|
Just found the previous background eclipse-lemminx/lemminx#328 to disable parentProcessWatcher by default. Since we've optimized the server-side parentProcessWatcher via the JDK native API, it is worth to enable it back if the performance gains are high. I suggest we put it in pre-release for a try first. |
Fixes #793
Signed-off-by: Snjezana Peco snjezana.peco@redhat.com