On 5/20/14, May 20, 2:17 PM, Mike Hearn wrote:
I'd like to create my main stage, show some splash widgets, then begin the
slower process of hauling the data and rest of the main UI into memory.
Unfortunately when I do this most of the startup time has the stage being
empty, instead of showing the splash. Introducing some artificial delays
makes it reliably appear, but of course I don't want to slow down startup.

My guess is that the app initialisation work is starving the render thread,
so the pixels for the splash don't hit the screen quickly enough. I tried
using an AnimationTimer to wait for a few pulses, but it didn't work. Ditto
for plain old runLater.

If anyone has ideas, it'd be appreciated.
I talked about some related issue at JavaOne 2013. My talk was called " Making Your 
JavaFX Application Fly on the Raspberry Pi" and can be found here:
http://parleys.com/play/524f478ce4b0c4f11ec57606/about
Unfortunately, I don't see that they posted just the slides anywhere, just me 
doing a voice over the slides.

While the talk is targeted towards the Pi, the JavaFX issues are pretty much 
platform independent.

While I did not use FXML, I used worker threads to load images.
There is a chunk of the talk where I cover the User Event thread, what is does 
(page 24 @ 16:44) and what to avoid, and a bit on worker threads themselves.

The demo app is in the OpenJFX tree at apps/toys/FXSlideShow

It looks like https://javafx-jira.kenai.com/browse/RT-17716 raises some issues 
that need to be fixed before FXMLLoader.load can work off the event thread :-(



--
David Hill <david.h...@oracle.com>
Java Embedded Development

"A hasty judgment is a first step to recantation."
-- Publilius Syrus

Reply via email to