Whole project recompiles with each keystroke
See original GitHub issueSometime between version 0.64.1 and now, the build triggering behavior seems to have changed. Whereas changes within a file still produced a reasonably fast auto-complete, it seems like each keystroke now triggers a rebuild of the entire project including the edited file, other files in the project and all declared Java dependencies. This seems to generally make auto-complete unusable since one is likely typing around the time auto-complete is needed and if each keystroke triggers a 1 minute build, auto-complete is generally always loading.
Perhaps it’s possible to restrict the rebuilding to the edited file, or cache all the symbols from the previous build until the next build is ready?
Environment
- Operating System: macOS 10.15
- JDK version: 11.0.4
- Visual Studio Code version: 1.52.1
- Java extension version: 0.64.1
Additional Informations
When I start typing, it triggers the below in the Java Build Status pane. Each build takes a few minutes.
8394ded0 Building [Done]
ba7e2d19 Validate documents [Done]
00cd587d Publish Diagnostics [Done]
c9fb754c Building [Done]
467b8d20 Building [Done]
a25e99a1 Validate documents [Done]
411b4544 Publish Diagnostics [Done]
c1bd89da Building [Done]
240f6be2 Building [Done]
a3536bca Building [Done]
6cea6ad2 Building [Done]
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (3 by maintainers)

Top Related StackOverflow Question
The “Publish Diagnostics” takes the longest for me. I frequently see
javaprocesses (2 of them because of the hybrid mode) in the background hugging the CPU (200-300% spikes), notably after the change to a Java file is made. It slows down the intellisence, and one has to wait for good 10-30 seconds for the auto-completion hints to appear. I attempted the following:"telemetry.telemetryLevel": "crash"- didn’t have any effect (would be nice if Java respected that, actually)."redhat.telemetry.enabled": nullorfalse- seems like does not have any effect and only applies to the Kubernetes plugin.If I can make a suggestion:
Thanks.
File auto save is off. I’m trying now on 0.73.0 with Java 11. Same symptom. I think the “building” messages are actually doing something, since each of them breaks down (while running) into a building 123/1000 files message.