apache/netbeans

Slow completion and insertion into a gradle project

philippefichet opened this issue · 2 comments

Apache NetBeans version

Apache NetBeans 20 release candidate

What happened

Code completion, and especially code insertion, is much slower with a Gradle project than with a Maven project.

How to reproduce

Just clone the https://github.com/philippefichet/slow-netbeans-example repository and see how long it takes to complete and insert code in the "src/main/java/com/github/philippefichet" class.
/OneEntity.java" class.
On line 17, do this between "return new Str" and "ing();" and complete with the "String (java.lang)" propotition
In the Maven project, insertion is fast, whereas in the Gradle project it's much slower.
A JFR screenshot for Gradle and Maven and an animated screenshot for Gradle and Maven are available in the repository.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Edition: Windows 10 Professionnel, Version: 22H2, Build: 19045.3693

JDK

Zulu21.28+85-CA

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

Slowness is less noticeable under Linux, but still seems to be present.

Are you willing to submit a pull request?

No

PS: The slowness seems to be present on version 19 (JDK 21) and 18 (JDK 17) but I have not tested an older version.

For your information, I've added two more accurate captures made with Azul/JFR and their conversion to flame graph in the https://github.com/philippefichet/slow-netbeans-example repository:

  • flight_recording_azul_mission_control_gradle.jfr
  • flight_recording_azul_mission_control_gradle.html
  • flight_recording_azul_mission_control_maven.jfr
  • flight_recording_azul_mission_control_maven.html