Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to speedup jar signer?

I use ant for sign my jars for web-start deployment. Ant.signjar is very slow when web-start signing. How to speedup signing process ?

like image 417
jreznot Avatar asked Jan 21 '13 12:01

jreznot


Video Answer


1 Answers

I found one possible solution.

Earlier in build script ant.signjar called sequentially for all jars (We use gradle for build, more than 20 MB dependecies). Now i use groovy library GPars methods: withPool(4) and eachParallel { ant.signjar }. It is cool for 2 cores in my pc and 4 cores in build server. (for 3 times faster)

Second trick is cache: we use cached signed jars for all RELEASE/NON-SNAPSHOT dependencies. When we run build without clean, it runs faster because uses cached signed libs from build directory.

like image 108
jreznot Avatar answered Oct 22 '22 13:10

jreznot