Re: How to force pixels to hit the screen?

2014-05-21 Thread Mike Hearn
Would that runLater() code always run after the splash image was finished being rendered? Unfortunately I tried this and it doesn't work. JavaFX has a dual threaded architecture in which all app logic and scene graph handling happens on the app thread, and the process of drawing a frame

Re: How to force pixels to hit the screen?

2014-05-21 Thread David Hill
On 5/21/14, May 21, 4:28 AM, Werner Lehmann wrote: Did you try to lower the priority of your thread(s)? Also, I the suggestion to wait a few frames, e.g. on the AnimationTimer, made a lot of sense to me. This will of course slow down total startup time but there is a better chance of having a

How to force pixels to hit the screen?

2014-05-20 Thread Mike Hearn
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

Re: How to force pixels to hit the screen?

2014-05-20 Thread Kevin Rushforth
Hi Mike, As long as you are doing any of the heavy lifting on the FX application thread it will necessarily starve the rendering, since the application thread is where animation is run and rendering is triggered. Applications are encouraged to do computationally expensive tasks or tasks that

Re: How to force pixels to hit the screen?

2014-05-20 Thread Mike Hearn
As long as you are doing any of the heavy lifting on the FX application thread it will necessarily starve the rendering, since the application thread is where animation is run and rendering is triggered. Applications are encouraged to do computationally expensive tasks or tasks that are

Re: How to force pixels to hit the screen?

2014-05-20 Thread Kevin Rushforth
I see. Is there any way to wait for the rendering thread to settle and process the commands produced by the app thread? No guaranteed way that I know of; we run into a similar issue with our robot-based unit tests. Using an AnimationTimer and waiting for a few frames might work, but it

Re: How to force pixels to hit the screen?

2014-05-20 Thread ngalarneau
Kevin, What if the splash screen was drawn in the start() method and then the rest of the start up code (including the FXML Loader stuff) was run from Platform.runLater()? Would that runLater() code always run after the splash image was finished being rendered? How does the code in

Re: How to force pixels to hit the screen?

2014-05-20 Thread David Hill
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