Scene graph performance
felix.bembrick at gmail.com
Thu Jul 21 10:39:41 UTC 2016
Thanks for your response.
This is what I suspected: what is ostensibly a hardware accelerated toolkit seems to barely utilise the GPU for scene graph animations.
But, even with that, my machine has dual high performance 16-core Xeons while my wife's machine has a single 2-core i5 and STILL the performance is barely indistinguishable!
I would love to discuss this with you off-list as I see this as the biggest impediment to expanding the use cases for JavaFX.
The Canvas node seems to perform quite well but, other than that, we basically have a toolkit suitable for forms with the occasional transition thrown in.
I think I can fix these issues and I will continue to further investigate the cause.
It's somewhat ridiculous that on my same machine I can write pure OpenGL code (not Direct3D) and animate 5000 Quake 3D characters and achieve at least 1000 FPS.
I don't think we can blame Java the language as Java is not running on the GPU.
It appears though that not much else is either!
(It seems the Quantum Renderer thread is working really, really hard. The GPU should be doing most of the heavy lifting).
> On 21 Jul 2016, at 20:07, Dr. Michael Paus <mp at jugs.org> wrote:
> Hi Felix,
> I have written various tests like the ones you use in FXMark and I have
> obtained similar results. I have even tried to substitute 2D shapes by
> using 3D MeshViews in the hope that this would give better performance
> but the results were not that good. Of course all this depends on the
> specific test case but in general I see that a JavaFX application which
> makes heavy use of graphics animations is completely CPU-bounded.
> The maximum performance is reached when one CPU/Core is at 100%.
> The performance of your graphics hardware seems to be almost irrelevant.
> I could for example run four instances of the same test with almost the
> same performance at the same time. In this case all 4 cores of my machine
> were at 100%. This proves that the graphics hardware is not the limiting
> factor. My machine is a MacBook Pro with Retina graphics and a dedicated
> NVidia graphics card which is already a couple of years old and certainly
> not playing in the same league as your high-power card.
> I myself have not yet found a way to really speed up the graphics performance
> and I am a little bit frustrated because of that. But it is not only the general
> graphic performance which is a problem. There are also a lot of other pitfalls
> into which you can stumble and which can bring your animations to a halt
> or even crash your system. Zooming for example is one of these issues.
> I would like to have some exchange on these issues and how to best address
> them but my impression so far is that there are only very view people interested
> in that. (I hope someone can prove me wrong on this :-)
>> Am 20.07.16 um 04:14 schrieb Felix Bembrick:
>> Having written and tested FXMark on various platforms and devices, one
>> thing has really struck me as quite "odd".
>> I started work on FXMark as a kind of side project a while ago and, at the
>> time, my machine was powerful but not "super powerful".
>> So when I purchased a new machine with just about the highest specs
>> available including 2 x Xeon CPUs and (especially) 4 x NVIDIA GTX Titan X
>> GPUs in SLI mode, I was naturally expecting to see significant performance
>> improvements when I ran FXMark on this machine.
>> But to my surprise, and disappointment, the scene graph animations ran
>> almost NO faster whatsoever!
>> So then I decided to try FXMark on my wife's entry-level Dell i5 PC with a
>> rudimentary (single) GPU and, guess what - almost the same level of
>> performance (i.e. FPS and smoothness etc.) was achieved on this
>> considerably less powerful machine (in terms of both CPU and GPU).
>> So, it seems there is some kind of "performance wall" that limits the
>> rendering speed of the scene graph (and this is with full speed animations
>> What is the nature of this "wall"? Is it simply that the rendering pipeline
>> is not making efficient use of the GPU? Is too much being done on the CPU?
>> Whatever the cause, I really think it needs to be addressed.
>> If I can't get better performance out of a machine that scores in the top
>> 0.01% of all machine in the world in the 3DMark Index than an entry level
>> PC, isn't this a MAJOR issue for JavaFX?
More information about the openjfx-dev