You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[regression] Version 0.81.0 takes more than twice the compilation time than the previous version #2071
changed the title [-]Version 0.81.0 is more than twice as slow as the previous version[/-][+]Version 0.81.0 buiding is more than twice as slow as the previous version[/+]on Aug 18, 2021
changed the title [-]Version 0.81.0 buiding is more than twice as slow as the previous version[/-][+]Version 0.81.0 takes more than twice the compilation time than the previous version[/+]on Aug 18, 2021
The only differences I'm seeing in our target between 1.2.0 (0.80.0) and 1.3.0 (0.81.0) are : buildship 3.1.5.v20210112-1646-s -> 3.1.5.v20210616-0346-s, m2e 1.17.0.20201112-0751 -> 1.18.2/latest, eclipse I20210621-1800 -> I20210810-1800
I would probably check the individual execution times of the plugins that comprise the JDT-LS product to get a better idea of where this may be happening.
I'm testing on Linux and tried with Java 11 & Java 16 as the runtime environment.
I don't think there is a major difference for startup of just the language server (which is independent of import+building), at least for me, on Linux. I tried rebuilding JDT-LS based off of the v1.2.0 and v1.3.0 tags as well as simply using the exact server content within vscode-java 0.80.0 and 0.81.0.
From repeatedly starting the language server 10 times at once, various times, all median start times were generally between 3000-3500ms on machine.
Do you have a sample project available publicly somewhere so we could compare the actual build time ?
@rgrunber Company projects cannot be shared. The following is an analysis from another perspective. Or we can make an appointment, we can use Sunflower software to watch remotely
Gradle compilation is divided into two steps. The first step is to initialize first, which takes 233 seconds, and the second step officially starts to compile, which takes 240 seconds.The compilation of the previous version 0.80.0 took 150 seconds in total.
Below is a screenshot of the cpu and jvm compiled by my local project
Gradle Deamon JVM init and build status
java Language Server JVM init and build status
Simple log information records the entire compilation process, the log level is message
I suspect it is related to the current version of bug #2020 fix
It took 233 seconds to initialize my project, which was more than two minutes. But, The sleep time waiting for the initialization task in eclipse.jdt.ls is only two minutes.
9:22:26 Initializing Language Server
...
9:24:26 Timeout while waiting for completion of job: Update project am(37)
That definitely seems to be the 2 minute timeout from #2020. Is this also reproducible after cleaning the language server workspace ? CC'ing @snjeza for comment.
I think 5 minutes is the normal compilation time. Because the initialization operation and the compilation operation are executed sequentially. The two actions of initialization and compilation of version 0.80.0 are executed in parallel, but the parallel execution is wrong. So my previous compilation time was 150 seconds, now it should be about 300 seconds.
The first compilation time after clearing the workspace is still about 6 minutes, which is basically the same as the previous version. However, the second compilation was excellent, and it only took about three minutes. This should be the best result. Thank you both. If you read the log and there is no problem, I will close this issue.
It's amazing. This result is what we want. Give you a thumbs up, I hope this fix can be released an official patch version, so I can let the team members update.
changed the title [-]Version 0.81.0 takes more than twice the compilation time than the previous version[/-][+][regression] Version 0.81.0 takes more than twice the compilation time than the previous version[/+]on Aug 22, 2021
Activity
[-]Version 0.81.0 is more than twice as slow as the previous version[/-][+]Version 0.81.0 buiding is more than twice as slow as the previous version[/+][-]Version 0.81.0 buiding is more than twice as slow as the previous version[/-][+]Version 0.81.0 takes more than twice the compilation time than the previous version[/+]rgrunber commentedon Aug 18, 2021
The only differences I'm seeing in our target between 1.2.0 (0.80.0) and 1.3.0 (0.81.0) are : buildship 3.1.5.v20210112-1646-s -> 3.1.5.v20210616-0346-s, m2e 1.17.0.20201112-0751 -> 1.18.2/latest, eclipse I20210621-1800 -> I20210810-1800
I would probably check the individual execution times of the plugins that comprise the JDT-LS product to get a better idea of where this may be happening.
$ cat .options
org.eclipse.osgi/debug/bundleStartTime=true
I can try this out also to see if I get any insights.
rgrunber commentedon Aug 18, 2021
I'm testing on Linux and tried with Java 11 & Java 16 as the runtime environment.
I don't think there is a major difference for startup of just the language server (which is independent of import+building), at least for me, on Linux. I tried rebuilding JDT-LS based off of the v1.2.0 and v1.3.0 tags as well as simply using the exact server content within vscode-java 0.80.0 and 0.81.0.
From repeatedly starting the language server 10 times at once, various times, all median start times were generally between 3000-3500ms on machine.
Do you have a sample project available publicly somewhere so we could compare the actual build time ?
mozhuanzuojing commentedon Aug 19, 2021
@rgrunber Company projects cannot be shared. The following is an analysis from another perspective. Or we can make an appointment, we can use Sunflower software to watch remotely
Gradle compilation is divided into two steps. The first step is to initialize first, which takes 233 seconds, and the second step officially starts to compile, which takes 240 seconds.The compilation of the previous version 0.80.0 took 150 seconds in total.
Below is a screenshot of the cpu and jvm compiled by my local project
gradle-server log
[debug] [gradle-server] Starting server.log
java language server log
javaLanguageServer.log
java language syntax server log ( It is strange that the grammar server finally printed the shutdown log)
javaLanguageSyntaxServer.log
mozhuanzuojing commentedon Aug 19, 2021
I suspect it is related to the current version of bug #2020 fix
It took 233 seconds to initialize my project, which was more than two minutes. But, The sleep time waiting for the initialization task in eclipse.jdt.ls is only two minutes.
rgrunber commentedon Aug 19, 2021
In your javaLanguageServer.log , I can see :
That definitely seems to be the 2 minute timeout from #2020. Is this also reproducible after cleaning the language server workspace ? CC'ing @snjeza for comment.
snjeza commentedon Aug 19, 2021
@mozhuanzuojing Could you check https://raw.githubusercontent.com/snjeza/vscode-test/master/java-0.82.0.vsix?
mozhuanzuojing commentedon Aug 20, 2021
@snjeza @rgrunber
Now I use java-0.82.0 version to compile my project as follows
Clean Java Language Server Workspace
First compilation. Time consuming: 7min 10s
java-0.82.0-clean-first-build.log
Second compilation. Time consuming: 5min 30s
java-0.82.0-second-build.log
Is my idea correct?
snjeza commentedon Aug 21, 2021
@mozhuanzuojing could you, please, test https://github.com/snjeza/vscode-test/raw/master/java-0.82.1.vsix
mozhuanzuojing commentedon Aug 21, 2021
@snjeza @rgrunber
I use java-0.82.1 version to compile my project. as follows:
Clean Java Language Server Workspace
First compilation. Time consuming:6min 45s
java-0.82.1-first-build.log
Second compilation. Time consuming:3min 25s
java-0.82.1-second-build.log
snjeza commentedon Aug 21, 2021
@mozhuanzuojing Could you, please, check https://github.com/snjeza/vscode-test/raw/master/java-0.82.2.vsix
mozhuanzuojing commentedon Aug 22, 2021
@snjeza
Clean Java Language Server Workspace
【0.82.2】First compilation. Time consuming:6min 35s
java-0.82.2-first-build.log
【0.82.2】Second compilation. Time consuming:20s
java-0.82.2-second-build.log
snjeza commentedon Aug 22, 2021
@mozhuanzuojing You have found the regression of eclipse-jdtls/eclipse.jdt.ls#451 Thank you!
I'm preparing a PR.
[-]Version 0.81.0 takes more than twice the compilation time than the previous version[/-][+][regression] Version 0.81.0 takes more than twice the compilation time than the previous version[/+]snjeza commentedon Aug 22, 2021
@v-yuyul @itsmaheshkariya @Moses-Everlytic @xiaomaimuchanyiyiba @rgrunber could you, please, check #2020 with https://github.com/snjeza/vscode-test/raw/master/java-0.82.2.vsix
rgrunber commentedon Aug 23, 2021
I've tried your vsix with spring-rest-client-examples and the project import completes as expected.
snjeza commentedon Aug 23, 2021
@rgrunber Great!. I have created the PR - eclipse-jdtls/eclipse.jdt.ls#1853
Could you check eclipse-jdtls/eclipse.jdt.ls#451