0

So, first of all this happenes only with Java project where we use lombok.jar. The project has more than 1900 Java files. Now the problem comes when I hit [CTRL+SPACEBAR] on the keyboard, or when I wait after typing the '.' key on the keyboard, for the auto complete to kick in.

The system (32 GB RAM, Processor AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx, 2100 Mhz, 4 Core(s), 8 Logical Processor(s), full SSD HDD) at times takes a staggering 8 to 10 seconds for the auto complete to show up, and the IDE would freeze. The issue is the same with both [Eclipse + Spring STS plugin + Lombok plugin], and [SpringSTS IDE + Lombok plugin].

Code assist is blazingly fast in both Eclipse and SpringSTS projects without lombok.jar

There is some scientist discussion around this in https://github.com/projectlombok/lombok/issues/2489, but did not finally resolve my issue as I do not want to go edit lombok itself. Did anyone face/ resolve this issue please?

Siva
  • 598
  • 3
  • 11

1 Answers1

0

So, after months I finally stumbled upon the answer and wanted to share it and hence this post. Per Eclipse documentation, annotation processing offered by external plugins can be slow (Lombok in this case), so we disable processing 'in editor'. Which means that annotation related errors show up after 'Eclipse build' is triggered, which is okay for me as I always have 'build automatically' set in Eclipse.

This configuration change brought down code assist time from 8-10 seconds to approx 1-2 seconds which I can live with.

This is what Eclipse documentation says

Enable processing in editor

When this option is enabled, processors will run whenever changes are made in the Java editor,as well as whenever the project is built. Enabling processors to run in the editor allows them togenerate contribute errors and warnings as you type. For instance, processors can red-squigglea bad annotation value to indicate a semantic problem that the compiler alone would not be able to discover.However, some annotation processors are slow enough that running them in the editor interferes withthe usability of the editor. In this situation, disabling this option can improve performance ofthe editor. Processors will still run whenever the project is built. This option does not apply toJava 6 annotation processors, which Eclipse can (for now) only run during a build.

Annotation processing setting in editor

Siva
  • 598
  • 3
  • 11