mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.13k stars 234 forks source link

JFileChooser performance when using WebLaf #704

Open 4SFED opened 1 year ago

4SFED commented 1 year ago

I have noticed around a 10x increase in time to display a JFileChooser when using WebLaf. I came across this bug:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6372808

I took the same code there and adapted it to either use WebLaf or WindowsLAF, code attached.

FileChooser.txt

The results were as follows:

D:\Tools\FileChooser>java -jar FileChooser.jar false start Using WindowsLAF leaving main. Thread[AWT-EventQueue-0,6,main] :: Before new JFileChooser() Thread[AWT-EventQueue-0,6,main] :: After new JFileChooser(), took [5632]. .showDialog exited.

D:\Tools\FileChooser>java -jar FileChooser.jar true start Using WebLAF leaving main. Thread[AWT-EventQueue-0,6,main] :: Before new JFileChooser() Thread[AWT-EventQueue-0,6,main] :: After new JFileChooser(), took [61188]. .showDialog exited.

When using WindowsLAF it took 5632ms to open. When using WebLaf it took 61188ms to open.

I am using weblaf-complete-1.29.jar

Is this a known issue or am i doing something incorrectly?

EDIT: just tried with version 1.2.13 and the results are the same.

tullisar commented 1 year ago

See https://github.com/mgarin/weblaf/issues/698, the underlying cause is the same from what I understand.