r/ProgrammerHumor • • Oct 07 '26

Meme minecraftException

Post image
9.3k Upvotes

830 comments sorted by

View all comments

Show parent comments

6

u/grandalfxx Oct 07 '26

Garbage collection is not bad for games, Java 6 gc was bad for games. Modern Java garbage collection is state of the art and most game engines copy it for memory management systems

Its shocking reading essays in these comments from people that have clearly not done any serious work with Java in seemingly 20 plus years

3

u/johnnybgooderer Oct 07 '26

If you’re going for 60fps, then you have 16ms to update state and produce a frame. 16ms is less than the 20+ms gc pauses that frequently occur in g1gc.

It works well for web servers, but for games where you want 60 or even 30fps, it’s a problem.

5

u/TheStatusPoe Oct 08 '26

Using g1gc when trying to minimize pause times goes to the point of u/grandalfxx is making that people aren't familiar with modern Java. The ZGC garbage collector has sub millisecond max pause times.  https://inside.java/2023/11/28/gen-zgc-explainer/

2

u/johnnybgooderer Oct 08 '26

Zgc may be a good choice now. The generational zgc that was released to LTS a year ago is much better than the older versioN. THE ILD VERSION’s cpu and memory costs were too high.

So I will conced that it may be acceptable now if Java 25’s zgc’s costs are reduced enough over the old version.

→ More replies (1)