spring-booteclipseperformancests

Slow Eclipse Spring STS plugin


Am new to Spring and installed Eclipse STS plugin and working with services seem to be dead slow with CPU spiking in usage. The laptop just heats up and literally the fan runs like a Jet engine responding directly to the start/ stop of the services.

Eclipse STS plugin

Although following have really ironed out all of the Eclipse performance issues with Spring STS for me, the actual daily development is just so slow where the services literally take minutes to start and Eclipse keeps freezing while debugging the code and normal code navigation also would freeze Eclipse while the services are UP.

The machine has 32 GB RAM, and Eclipse goes to anywhere between 2 GB to 8 GB of memory usage. Just do not know what is wrong here. Anyone faced this issue?


Solution

  • I found the issue here and the fix, and wanted to post it for anyone else who might be facing the same. The problem was with Eclipse 'Launch Group'.

    Short answer - Dont use launch groups to start STS 'run configurations', just individually launch the services.

    Long answer - Read on below ⤵

    In my case I have multiple Spring services that need to start in a particular order, and so I used Eclipse 'Launch Group' to automate 'Run Configurations'.

    Launch group confirguation

    I believe the problem really being with 'Launch Configurations', where it introduces 'build and refresh' of the 'Run Configurations' that have been put into launch groups. I'm sure there would be some good reason for Eclipse to have done this, but that really did not work for me in this case. Each time I start/ restart services using launch configurations, the 'Launch Configuration' is just triggering 'build' for all 9 Spring projects, and this adds up to Eclipse workload freezing it for good 6-10 minutes (as that is the project build time) before handing over control to STS plugin, which further takes few minutes to start all the services.

    Workload in Eclipse JOB queue

    Once I stopped using 'Launch Configurations', 'start/ restart' of each service via the STS plugin is just seconds, not even minutes.

    What a ride it had been! Hope this helps someone!!