News for hackers. Stuff that matters.
Re:Minecraft removing obfuscation in Java Edition by zachrip on Wednesday October 29, 2025 @06:10PM (#45753742)
Why do they obfuscate if they're just going to provide the mappings?
Re:Minecraft removing obfuscation in Java Edition by singron on Wednesday October 29, 2025 @06:28PM (#45753925)
Proguard can also apply optimizations while it obfuscates. I think a good JVM will eventually do most of them itself, but it can help code size and warm-up. I'm guessing as JVMs get better and everyone is less sensitive to file sizes, this matters less and less.
Re:Minecraft removing obfuscation in Java Edition by mort96 on Wednesday October 29, 2025 @07:08PM (#45754291)
And there's no way to do only the optimisation part? Surely you could optimise without messing up class and method names..?
Re:Minecraft removing obfuscation in Java Edition by the_hoser on Wednesday October 29, 2025 @07:53PM (#45754669)
One of the biggest optimizations it offers is shrinking the size of the classes by obfuscating the names. If you're obfuscating the names anyway, there's no reason that the names have to be the same length.

"hn$z" is a heck of a lot smaller than "tld.organization.product.domain.concern.ClassName"

Re:Minecraft removing obfuscation in Java Edition by voxic11 on Wednesday October 29, 2025 @11:01PM (#45755974)
Yeah in some ways the obfuscation and mappings are similar to minification and sourcemaps in javascript.
Re:Minecraft removing obfuscation in Java Edition by mort96 on Thursday October 30, 2025 @04:39AM (#45757681)
And minification in JavaScript only reduces the amount of bytes that has to be sent over the wire, it doesn't improve runtime performance.
Re:Minecraft removing obfuscation in Java Edition by voxic11 on Thursday October 30, 2025 @08:14AM (#45759170)
According to the v8 devs it also can increase parsing performance

> Our scanner can only do so much however. As a developer you can further improve parsing performance by increasing the information density of your programs. The easiest way to do so is by minifying your source code, stripping out unnecessary whitespace, and to avoid non-ASCII identifiers where possible.

https://v8.dev/blog/scanner

Re:Minecraft removing obfuscation in Java Edition by mort96 on Thursday October 30, 2025 @11:55AM (#45761450)
Sure, but that's also just in the category improving loading a bit. It doesn't have anything to do with runtime performance.
Re:Minecraft removing obfuscation in Java Edition by mort96 on Thursday October 30, 2025 @04:25AM (#45757607)
So we're not talking about runtime performance, but some minor improvement in loading times? I assume that once the JVM has read the bytecode, it has its own efficient in-memory structures to track references to classes rather than using a hash map with fully qualified names as keys
Re:Minecraft removing obfuscation in Java Edition by swiftcoder on Thursday October 30, 2025 @05:03AM (#45757823)
Proguard was heavily influenced by the needs of early Android devices, where memory was at a real premium. Reducing the size of static tables of strings is a worthwhile optimisation in that environment
Re:Minecraft removing obfuscation in Java Edition by mort96 on Thursday October 30, 2025 @05:27AM (#45757970)
Okay but we're talking about Minecraft on desktops and laptops, where the relevant optimizations would be runtime performance optimizations, no?
Re:Minecraft removing obfuscation in Java Edition by swiftcoder on Thursday October 30, 2025 @12:29PM (#45761860)
Probably, but proguard tends to bundle the whole lot together
Re:Minecraft removing obfuscation in Java Edition by saagarjha on Thursday October 30, 2025 @04:34AM (#45757653)
The names need to be stored somewhere because they are exposed to the program that way
Re:Minecraft removing obfuscation in Java Edition by mort96 on Thursday October 30, 2025 @04:38AM (#45757673)
They have to be stored somewhere, but they don't have to be what the JVM uses when it e.g performs a function call at runtime. Just having the names in memory doesn't slow down program execution.
Re:Minecraft removing obfuscation in Java Edition by saagarjha on Thursday October 30, 2025 @04:44AM (#45757720)
At runtime this is going to be a branch instruction yes
Re:Minecraft removing obfuscation in Java Edition by throwaway2037 on Thursday October 30, 2025 @10:45AM (#45760599)
Even a hash map with fully qualified names as keys wouldn't be so bad because Stirng is immutable in Java, so the hash code can be cached on the object.
Re:Minecraft removing obfuscation in Java Edition by kulahan on Wednesday October 29, 2025 @06:28PM (#45753924)
Well, maybe that's why they're not obfuscating anymore.