JavaFX graphic performance slow on Mac? Clock app

Scott Palmer swpalmer at gmail.com
Fri Jul 10 02:50:55 UTC 2015


I just tried this app on my MacBook Pro (Retina, 15-inch, Mid 2015)
The framerate was always 60fps. The higher performance AMD graphics processor was active - as it is for all Java programs :-(.
The CPU usage reported for the process by Activity Monitor varied between 18 and 30%, and settled at just under 20%.  The interesting thing I saw though was that the CPU reported via jvisualvm was only 2%, and the total CPU usage of the system was only 10%… so I don’t quite understand how to read those numbers!

It seemed like threads running in parallel were added together to make the total CPU for the process seem higher. I’ve attached screen shots of the measurements.  Perhaps someone can interpret the discrepancy.

Scott



> On Jul 9, 2015, at 8:19 PM, Jim Graham <james.graham at oracle.com> wrote:
> 
> I was able to verify the CPU usage on my retina MBP and further show that ES2 on Windows also consumes a similar amount of CPU:
> 
> Mac (using ES2): 20-25%
> Windows (using D3D): 3%
> Windows (using ES2): 20%
> 
> so this is definitely related to our use of OpenGL and not a Mac platform issue (though it did have a couple percent more overhead than the ES2 pipe on Windows, the bulk of the performance was ES2 vs OGL).
> 
> Can you remove the external dependencies on the date formatter from your test case and then submit a bug so we can track this issue?
> 
> 			...jim
> 
> On 7/8/15 7:57 AM, Tobias Bley wrote:
>> Hi Jim,
>> 
>> please checkout the small app on Github: https://github.com/tobium/JavaFXPerformanceTest
>> 
>> Mac OS X: 10.10.4
>> Mac Book Pro Retina (Late 2012), Intel HD Graphics 4000 1024 MB, 8 GB RAM, i7 2,6Ghz
>> Java FX 1.8.0_60
>> 
>> 
>> FPS: Mac and Windows: 60 FPS
>> CPU usage: Mac: 25-80%, Windows: 0-3%
>> 
>> 
>> Best regards,
>> Tobi
>> 
>> 
>>> Am 07.07.2015 um 21:23 schrieb Jim Graham <james.graham at oracle.com>:
>>> 
>>> Hi Tobi,
>>> 
>>> Can you share your small clock app?  Perhaps file a bug and attach the source?
>>> 
>>> Also, what version of MacOS are you running on what hardware?  (And compared to what version of Windows on what hardware?)
>>> 
>>> 			...jim
>>> 
>>> On 7/7/15 4:32 AM, Tobias Bley wrote:
>>>> 
>>>> 
>>>> Hi,
>>>> 
>>>> currently our experiences with JavaFX on Mac are very disappointing. While JavaFX on Windows runs very good with low cpu usage, JavaFX on Mac via  Java 8 doesn’t perform well. I created a little clock app which uses between 25% and 80% cpu usage. But what’s the reason for? I though JavaFX rendering pipeline works on the graphic device? So why there is such a traffic on the CPU?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Best regards,
>>>> Tobi
>>>> 
>>>> 
>> 



More information about the openjfx-dev mailing list