[External] : Re: Preload fxml to avoid slow show()

Andy Goryachev andy.goryachev at oracle.com
Fri Aug 25 21:55:15 UTC 2023


Another suggestion might be to load tabs lazily.  I don't think FXML "pre-loading" is possible.

-andy



From: Davide Perini <perini.davide at dpsoftware.org>
Date: Friday, August 25, 2023 at 14:31
To: Andy Goryachev <andy.goryachev at oracle.com>, openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: [External] : Re: Preload fxml to avoid slow show()
My tab pane is very complex with a lot of tabs,
having an FXML is very welcomed.

Thanks
Davide
Il 25/08/2023 16:45, Andy Goryachev ha scritto:
You can try creating the scene graph programmatically, thus avoiding FXML entirely.

-andy


From: openjfx-dev <openjfx-dev-retn at openjdk.org><mailto:openjfx-dev-retn at openjdk.org> on behalf of Davide Perini <perini.davide at dpsoftware.org><mailto:perini.davide at dpsoftware.org>
Date: Friday, August 25, 2023 at 00:45
To: openjfx-dev at openjdk.org<mailto:openjfx-dev at openjdk.org> <openjfx-dev at openjdk.org><mailto:openjfx-dev at openjdk.org>
Subject: Preload fxml to avoid slow show()
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230825/ee24bc1e/attachment.htm>


More information about the openjfx-dev mailing list