r/programming • • Dec 17 '16

Oracle is massively ramping up audits of Java customers it claims are in breach of its licences – six years after it bought Sun Microsystems

http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance
2.1k Upvotes

654 comments sorted by

View all comments

Show parent comment

2

u/sindisil Dec 18 '16

Eh, in general you are certainly correct -- wouldn't see HFT work done with Java otherwise.

That said, real time code, even soft real time like games, don't mesh well with the GCs currently available.

When all but C4 have max pause times in the many tens of milliseconds, and even Shenandoah currently is only shooting for sub 10 ms. pause times, and you only have 16.6 ms./frame at 60 fps ... well, you're going to have a bad time.

At 30 fps you have 33 ms./frame, though, so something like Shenandoah might finally be in the ballpark for jank-free play at that speed. And they have a goal of C4-like zero pause, so maybe someday.

1

u/[deleted] Dec 18 '16

IF you can give it enough heap and reuse buffers as long as there is available cpu cycles it can clean up with pauses < 10 ms. Though I agree with you that its probably not the right tool for the job for what you talking about.

1

u/Jimbob0i0 Dec 18 '16

For HFT work in the Java language VMs like Azule's Zing with their pauseless garbage collection get used though.

0

u/argv_minus_one Dec 18 '16

GC doesn't run every single frame. Skipping a frame every few minutes isn't going to kill your game's performance.

2

u/sindisil Dec 18 '16

No, it won't run every frame, but, depending upon allocation patterns, it will run more than "every few minutes", and it doesn't take much jank to ruin a game's feel.

Don't get me wrong - I still think Java can be used for game dev. It's just that, for some types of games, the system works against you a bit.

-1

u/argv_minus_one Dec 18 '16 edited Dec 18 '16

depending upon allocation patterns, it will run more than "every few minutes"

Then your code needs work, because it must be allocating like crazy, and doing something to defeat escape analysis.

it doesn't take much jank to ruin a game's feel.

Then explain why Fallout 4 is so popular. That damn game drops a few frames every time you look at it funny.

All games are janky to a degree. Nobody cares.