Open Sorceror opened 10 years ago
I am having something like this:
Took 0.417 sec to create default file chooser
Took 0.795 sec to create weblaf file chooser
This time depends on the loading of the file tree and list/table elements plus their first-time visual representation (icons, name, size etc.). Standard JFileChooser doesn't have file thumbnails and doesn't use such information so yes, it loads faster due to lesser amount of UI elements and information loaded from hard drive.
By the way, probably there is such a big difference in time between our result due to the hard drive speed and type, for example I've got an SSD here.
Though I will be doing some optimizations to WebFileChooserUI later, so probably the load speed will get improved with time, but not too much.
Thanks for this a lot other neat features in WebLaF. Though maybe the biggest bottleneck on my machine is the external usb disk which is touched by the file chooser, also second run of the file chooser is much quicker (probably due fact that icons are already cached).
Yes, USB can really hang for a while. And the second run is always fast due to many factors, not just the icons initialization or file structure cached.
Probably if opening file chooser right away when user requests it is critical for you - you might want to call new WebFileChooser()
while application is loading (or simply create the instance which you will use later at the initialization. That might help a bit.
I like WebLaF for lots and lots of nice features, but currently rewriting some GUI parts of one project to WebLaF using advanced features (like pretty tooltips, notifications, etc.) and I just noticed that selecting a file is quite slow. So I made some small tests and find out that creation (first is the slowest) of JFileChooser/WebFileChooser tooks about 2.5s, which is already noticeable.
Here is some SSCCE
My resutls on Win 8, Java 1_8_05 (64bit)