Preload fxml to avoid slow show()

Davide Perini perini.davide at dpsoftware.org
Fri Aug 25 07:45:30 UTC 2023


Hi,
I have a tabpane with 15 tabs, every tab has his own controller and it's 
pretty crowded.

On a 13900K CPU, show() method requires more than 750ms,
this feels laggy...

After the first show() call, loading the tab pane is much faster...

Is there a way to "preload" an fxml?

I tried to show() and hide() it immediately and it seems to help,
but what is the best way to do it?

Thanks
Davide


More information about the openjfx-dev mailing list