r/ProgrammerHumor • • Oct 07 '26

Meme minecraftException

Post image
9.3k Upvotes

830 comments sorted by

View all comments

2

u/Terrariant Oct 07 '26

Well…just because it was made in Java does not mean it’s good. Minecraft runs like a POS if we’re being honest here, and that is mostly because of Java quirks with garbage collection afaik

2

u/DiskPsychological928 Oct 07 '26

Hmm I dont know Iris, Sodium etc make the Performance quite impressive esspeacilly with shaders. And the Mods are also made in Java

1

u/Owl_Bear_Snacks Oct 07 '26

Ok let’s collect all those modification things and call them BONTO.  I agree, BONTO runs great and is fun but probably could have been better if it wasn’t written in Java because some of what’s in BONTO is Java workarounds.  But also some of BONTO is fixing decisions from BONTO’s original author.  But I’m glad BONTO exists because if it was lua and C++ I’m not sure BONTO would have AE2.

1

u/Terrariant Oct 07 '26

Still runs into garbage collection problems at higher levels of RAM and is unplayable at lower values though, like there are two RAM things that drive me crazy.

First, Minecraft should not require more than 4GB of RAM to look good and run at a constant 60fps with no stuttering

Second, the way Java garbage collection works, it sweeps your entire memory any time it cleans up. So if you allocate 16+ GB of RAM it can be detrimental to the game’s FPS, which again just drives me crazy

3

u/DuckShapedGoose Oct 07 '26

You clearly haven't dealt or interacted with Java in the past like 15+ years if "sweeping the entire memory any time it cleans up" is still how you would describe java garbage collection.
First of all, there is no "the garbage collector". There is a default (g1gc), but it comes with multiple options optimized for different usecases.
ZGC for example is a popular choice for minecraft because it is optimized for real time applications and minimized pause times, especially since generational zgc was introduced in Java 21.
None of the two mentioned examples simply "sweep your entire ram".

0

u/Terrariant Oct 07 '26

I mean it just takes a quick google search to confirm, did you try that? It looks like it creates a CPU bottleneck if you have too much RAM.

And it’s not rocket science to think that if you allocate more RAM to run the game, the JVM will have to clean more things up each time garbage collection runs?

2

u/DuckShapedGoose Oct 07 '26

It takes a quick google search to confirm that garbage collection does not just blindly sweep the entire ram and that generational zgc was specifically introduced to minimize pause times on high ram allocations, yes.
And unless you get into very heavy modding or are running a large server, minecraft does not nearly require enough allocated ram to make even the default g1gc an issue. Generational zgc starts outperforming g1gc at around 12-16gb iirc. That is way more than vanilla or even many modpacks need.

2

u/Terrariant Oct 07 '26

I specified 16gb+ of RAM in my original comment, and I was seeing these issues trying to get vanilla MC up to its max settings, not modded…

Look even if you are right, do you have to be so fucking condescending? Lmao

1

u/DuckShapedGoose Oct 07 '26

Well you don't need 16+gb to push vanilla to its max. There is no reason for it. It'll work fine on 8. But even if high ram allocations are necessary, switching to a different gc can mitigate the issue. That's all I'm saying.
Sorry if my very first sentence sounded condescending, I do admit that that can sound kinda rude in text form without any tone. Bad wording on my part.
Was trying to say that what you were saying was a real issue way back in the day but has since been improved a lot.

1

u/Ok-Scheme-913 Oct 09 '26

Why you write shit you have no idea about?

0

u/Kevdog824_ Oct 07 '26

Them: Writes you a long response that clearly demonstrates they know what they’re talking about

You: did you try just googling it bro?

1

u/DiskPsychological928 Oct 07 '26

Next Level would be: "ChatGPT says"

1

u/DiskPsychological928 Oct 07 '26

But them again... you have tons of Games out there in c# or c++ that use Garbage collectors aswell.

Unity and unreal both have Garbage collectors

1

u/Ma4r Oct 08 '26

Most games that use C# only runs it on business logic.

1

u/Ok-Scheme-913 Oct 09 '26

4GB for an open world game where a bunch of stuff is simulated constantly?

Fucking slack it's almost that much, what you play on, your smart watch?

And you are so wrong on how a GC works that it's laughable.

1

u/Broeder_biltong Oct 07 '26

MC runs fine, just not with a shit on of mods that are full of leaks and bugs. 

1

u/Terrariant Oct 07 '26

Vanilla MC? On max settings? You sure about that?

1

u/Acceptable_Handle_2 Oct 08 '26

MC does not run fine.

1

u/Ma4r Oct 08 '26

Yes, by culling a shit ton of simulation for things that should be easily handled by modern processors,

1

u/QuaternionsRoll Oct 07 '26

Tbpf no, the performance difference between Java and Bedrock are still gargantuan. The JVM is only one of many reasons for that, though.