Codarama / diet-engine

Diet significantly minimizes the space used by your project's /lib
codarama.github.io/Diet
MIT License
3 stars 2 forks source link

Improve jar extraction speed. #7

Closed ayld closed 9 years ago

ayld commented 10 years ago

We should see if there's a way to speed up jar extraction or better yet if there's a way to remove it altogether.

I'm thinking of mounting the jars (they're zips so it should be possible) or streaming them somehow.

tishun commented 9 years ago

Started work on a prototype.

I think we need to skip exploding the jars altogether. Instead we should modify the matchers to examine elements from the jar (zip) archive and then, when and only when we have a match, we would extract it and place it in our target directory.

This would speed up the execution time A LOT. Scientifically speaking :smiley_cat:

Currently one of my test projects requires more than 15 minutes to minimize ... and it is a small project

ayld commented 9 years ago

Are you running it over a full /m2 repo? It shouldn't be slow for anything around ~100 jars as dependencies.

tishun commented 9 years ago

Why, yes, I was.

Still ... would be nice to speed it up

ayld commented 9 years ago

Oh yes speed up is definitely necessary :) but my main idea about the large repos was for the build tool plugins to handle them (our maven/gradle/ant plugins).

ayld commented 9 years ago

No need for this as we're no longer extracting jars as per 0ea527da1c51a7c0a26bbabe5d62270719a36831.