niedziela, 19 czerwca 2011

Shrink your JAR

Releasing your small project / library into public? Think about shrinking it beforehand - it's always nice to save some bandwidth if possible. There is nice (free!) tool for this purpose - ProGuard. Results, as published on the web, are quite encouraging. For example Apache Ant went down to 242K from 2.4M and that's staggering 90%.
What's more, ProGuard can do more that mere shrinking. Dead code listing (optimization) and obfuscation all come bundled.
To sum up, one quick run of this handy tool can make your release smaller and less prone to reverse-engineering. Give it a try!

2 komentarze:

mlu pisze...

You cannot shrink your jars if you want your project to look respectable. If you consider a 200kb project you think ooh, that's a small code, it isn't worth it, and you leave it behind. But if you on the other hand look at a staggering 200mb project, then you think whoa, this is a hog, it has shitloads of useful functions, let's give it a try.

qba pisze...

Well, this sound plausible but only under the condition that managers, not techies are making technical decisions ;) Fortunately many people rather take a look at functional/nonfunctinal requirements.