Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 8u40 Swing GUI performance

I have an application that's presenting very complex Swing GUI. GUI contains total of about 60 000 different controls (mostly labels, less text fields). Basically, it's a table where each of many cells contains a stand alone control with few labels and a text box.

The problem i'm suddenly having is related to java releases after (and including) 8u40. Project is built using JDK 8u122. When i run my application using Java 8u31, everything works fine and smooth. When i run my application using any Java (JRE) past 8u31, application starts rendering my complex controls, then soon takes 100% CPU and it all blocks, i have to kill my app.

Why's that? I was checking patch notes for 8u40 but i wasn't able to find anything that could cause such a big slowdown.

Do you have some ideas?

like image 879
guest86 Avatar asked Nov 07 '22 17:11

guest86


1 Answers

This seems to be related to -XX:-UseAdaptiveSizePolicy VM argument I'm using!

Without it, things work even on newer Java versions.

Now, with so many controls, I need -XX:-UseAdaptiveSizePolicy

like image 153
guest86 Avatar answered Nov 15 '22 06:11

guest86