gc options for best JFX performance
jmartine_1026 at yahoo.com
Sun Jun 3 08:03:18 PDT 2012
Thanks a lot guys for the good feedback. I'll follow up on it over the next few days. If anything pops up relating JFX I'll respond.
From: John Hendrikx <hjohn at xs4all.nl>
To: openjfx-dev at openjdk.java.net
Sent: Saturday, June 2, 2012 6:49 PM
Subject: Re: gc options for best JFX performance
I really don't think a few KeyFrame and KeyValues is going to have any
impact -- making them mutable is not going to happen. Just moving the
mouse over the screen is going to create more objects than that.
Create some heap dumps, look through them, or profile your application
and find out where you might be able to optimize a bit -- it's often
surprising where the real memory/performance issues are coming from.
On 2/06/2012 16:06, Jose Martinez wrote:
> Thanks Jiri. Yeah I understand those things. I was naively hoping that there was some magic concoction of JVM options that works ideally for JFX apps.
> I try very hard not to create new objects during game play but because the KeyFrame and KeyValue classes immutable I imagine that those are what are building up in memory and getting cleaned up by the GC. I create all my projectiles and enemy units before the round begins. But with each shot fired I have to create KeyFrames and KeyValues to send the projectile to its destination. Maybe making those classes non-immutable will help in keeping memory down. I imagine there might be some complexity to changing a Keyframe that is attached to a Timeline, or a KayValue that is attached to a KeyFrame, which is probably why they were designed to be immutable.
> Also I have to create new Duration objects to keep track of time.
> From: "goddard at seznam.cz"<goddard at seznam.cz>
> To: Jose Martinez<jmartine_1026 at yahoo.com>
> Cc: openjfx mailing list<openjfx-dev at openjdk.java.net>
> Sent: Saturday, June 2, 2012 4:52 AM
> Subject: Re: gc options for best JFX performance
> I believe there're no generic JVM settings for "best performance" Until you have perf. issues, I'd live with the default.
> If you want to do perf. tuning, it's application / environment dependent. Identify your bottleneck (network, i/o, memory, code etc.) and then try specific settings for that one.
> If you have big GC pauses, think about how much memory your app uses and if the heap is not too large, or what's the lifetime of objects in your app and adjust the generations in the heap accordingly.
> Regards, Jiri
> ------------ Původní zpráva ------------
> Od: Jose Martinez<jmartine_1026 at yahoo.com>
> Předmět: gc options for best JFX performance
> Datum: 02.6.2012 07:36:54
> I have tried the following GC modes but none of them get rid of the noticeable
> 'stop the world' delays.
> Out of those my favorite so far is UseParNewGC.
> I also use the following options.
> --Xms150m -Xmx200m -XX:MaxGCPauseMillis=1
> Are there other options that you would recommend? Has anyone come up with a
> concoction of options that works best or a rule of thumb for configuring GC in
> JFX applications?
> If I cannot find a good set of options I will have to resort to calling
> System.gc() at strategic intervals.
More information about the openjfx-dev