JavaFX graphics performance and suitability for advanced animations
djfranken at gmx.de
Sat May 25 07:07:30 PDT 2013
I'm also very interested in the topic. I suspect many smoothness issues are related to lack of pre caching, e.g. transition and animations lag when shown the first time because of a lot of initial instantiation, lazy allocation, gpu upload, tesselation, image caching etc. The smart resource conservation probably leads to reduced smoothness. Basically JavaFX might be too smart for its own good ;)
A manual precache option could help that can render soon-to-be-visible elements in a hidden off screen buffer scene to make sure all rendering resources are ready.
I can't produce specific examples right now, but essentially many of the ensemble animation examples already exhibited these kinds of lags.
Daniel Zwolenski <zonski at gmail.com> wrote:
>The Tower Defense game did go quiet. Partly this was because I was
>traveling up until a couple of weeks ago.
>But a bigger reason is because even in the very simple and limited
>functionality we had we already hit some pretty serious issues. The
>canvas in particular was doing really weird buffer-overflow style
>effects and having big z-order issues. Animations, particularly with
>text, were jerky and not real nice, with timing and smoothness issues.
>At this stage I don't think there's much point developing the game code
>further until the issues it has hit get reviewed by the jfx team.
>Basically the point of the game was to test jfx performance and on that
>front, it found jfx to be very poor. Note that I'm using the term
>'performance' to mean 'smoothness of user experience' not the more
>limited and less useful metric of 'framerate'
>Its entirely possible that the problems may be in the game code itself
>but someone from the jfx team would need to feed back on this, since as
>far as we could, we used best practices or guessed at them. Part of the
>point of the project was to get feedback on these best practices from
>people who understood the internals of jfx.
>It is also possible that j8 has improved here but someone would need to
>run the game code against this. Based on John's comments, it sounds
>like similar issues are still present.
>I documented the issues in an email several months back (issues are
>easily reproduced by running the code) and had kind of hoped there
>might be a little look into it while I was away, but without a bit of
>noise around the topic I think it lost focus.
>I am happy to help anyone who is interested to reproduce and
>investigate the issues. Just ask.
>On 25/05/2013, at 10:03 PM, "John C. Turnbull" <ozemale at ozemail.com.au>
>> I have previously posed questions about the limits of performance
>> be expected with JavaFX and also the kind of applications for which
>> In response to this and other questions from JavaFX developers a
>> created to develop a Tower Defence game in JavaFX. Has this project
>> abandoned? Is there a recent release with a working game? Last time
>> checked the game was at a stage where it showed a few enemies
>> but that was about it.
>> I am still very interested in this whole topic. From my own personal
>> endeavours I have found JavaFX (in general) to be disappointing when
>> comes to performance. Even with the latest builds of JavaFX 8, the
>> animations in Ensemble are quite choppy and not at all smooth on both
>> (Windows) machines I have run Ensemble on. On the same machines
>> even complex animations that I have developed using OpenGL and C++
>> smooth indeed.
>> I am principally a Java developer and do not want to have to use
>> my projects but if there is something inherent in JavaFX that
>> from performing at an adequate level then I would like to know about
>> 1. Can someone from Oracle please outline the full range of
>> applications for which JavaFX is or will be suitable for?
>> 2. Is there something inherent in the JavaFX architecture (such
>> CPU/GPU interaction, the performance of the JVM or the Java language
>> that limits its suitability and thus effectiveness in advanced
>> 3. Is this choppiness and lack of smoothness I have experienced
>> typical of JavaFX performance or is it some issue with my
>> environment/drivers etc.?
>> 4. Is JavaFX more targeted at form-based UIs rather than high
>> performance graphics?
>> 5. Do you have any other comments on JavaFX and its suitability
>> advanced animations and visualisations?
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
More information about the openjfx-dev