PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Shrink jar below 4MB

Open Electroid opened this issue 4 years ago • 4 comments

Some Minecraft hosting platforms limit jars to 4MB, we should try to stay under that limit. This is a similar policy that the WorldEdit devs take.

Electroid avatar Jun 14 '20 21:06 Electroid

What is the size atm?

Have someone tried https://wvengen.github.io/proguard-maven-plugin/?

KingOfSquares avatar Jun 14 '20 21:06 KingOfSquares

It's about 4.7MB right now, and progaurd seems like a good idea. Someone should try it out!

Electroid avatar Jun 15 '20 04:06 Electroid

Looking at the translations right now, it looks like it takes >1MB, maybe add an optional "mini" PGM that retrieves these translations when they are needed instead of packaging them together (which maybe could allow new translations without updating the PGM jar file itself?)

jasoryeh avatar Jul 13 '20 18:07 jasoryeh

The PGM jar is 4.9MB, removing translations only makes it go down to 4.5MB, because even if they are 1MB, once compressed they're way less. If you remove the lib folder in PGM, the size shrinks to 1.5MB, that means, pgm has 3MB occupied by compressed libraries. If proguard is used, most of those 3MB of libraries could be removed because they're unused code

Pablete1234 avatar Jul 14 '20 13:07 Pablete1234