Slow Eclipse Spring STS plugin
Asked Answered
G

1

1

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?

Glindaglinka answered 17/1, 2023 at 4:33 Comment(0)
G
1

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!!

Glindaglinka answered 17/1, 2023 at 4:53 Comment(1)
I just 'External Launch Configurations' to kick off some 'bat' files to start my Node JS server and clean up of logs etc. and all of that does not affect Eclipse performance, and is just fine. The problem is only with 'Launch Configurations + STS Plugin'.Glindaglinka

© 2022 - 2024 — McMap. All rights reserved.