Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Mike Hearn
I'm trying (mostly in vain) to optimise the startup time of my app. It takes about a second to build the main GUI via FXMLLoader.load() - probably because the GUI is getting a little bit complex but I think mostly because it's all running interpreted, as it's one of the first things the app does.

Re: Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Tom Schindl
On 26.04.14 11:42, Mike Hearn wrote: I'm trying (mostly in vain) to optimise the startup time of my app. It takes about a second to build the main GUI via FXMLLoader.load() - probably because the GUI is getting a little bit complex but I think mostly because it's all running interpreted, as

Re: Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Mike Hearn
At e(fx)clipse we have an FXML to Java translator who removes all the reflection overhead from FXML. It does not yet support all FXML features but we are steadily improving it and with test cases we are able to fix problems quite fast. Maybe this is an option for you? That would be very

Re: Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Tony Anecito
Hi Tom this is also true for Swing and the EDT. I had heard years ago jre 8 was going to address this via 2 drawing threads and modularity but jigsaw was delayed and not sure what happened to the 2 drawing thread idea. I really wish we could instantiate windows in memory and when needed draw

Re: Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Tom Schindl
If you don't use Tooltips context menus you can construct the scenegraph in any thread. Tom Von meinem iPhone gesendet Am 26.04.2014 um 21:48 schrieb Tony Anecito adanec...@yahoo.com: Hi Tom this is also true for Swing and the EDT. I had heard years ago jre 8 was going to address this

Re: Why can Scene's only be constructed on the UI thread?

2014-04-26 Thread Felix Bembrick
Why do tooltips and context menus matter? Is it because they will later be instantiated on the wrong thread when they pop up? On 27 Apr 2014, at 7:04, Tom Schindl tom.schi...@bestsolution.at wrote: If you don't use Tooltips context menus you can construct the scenegraph in any thread.