how can i reduce the size of jar files for updates?

Are you ‘striping’ your jars? 130MB for a bunch of class files is a humongous size, which makes me think that you’ve either striped (unpacked a whole bunch of deps and then repacked them into a single giant jar, or in this case, evidently, 3 of them), or you’ve included large resources such as a big background image for your app in these jars.

Undo that – don’t stripe, and have your app deployment be a sizable amount of jar files. If you have a bunch of resources (such as said large background image), make sure these end up building into different jars; your build tool should have support for this.

At that point, you have lots of smaller jars and ‘an update’ most likely means only a few of the jars have changed at all. Thus, it now is a matter of sending the hashes of those jars to a central server, with that server reporting back: Okay, you only need updates for this, that, and the other jar, but not the rest.

jars are already compressed, so at that point, just send those jars.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top