8000 Implement a custom maven assembly plugin to reduce jar size by CanBerker · Pull Request #670 · RumbleDB/rumble · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement a custom maven assembly plugin to reduce jar size #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CanBerker
Copy link
Collaborator

@ghislainfourny You had asked me to investigate the jar size a while ago. I have added a custom assembly descriptor to cleanly specify which files are to be included in the jar but I have not seen a reduction in size. Since we are including a lot of dependencies as well, these may be playing a role in size as well.

I created this PR so that you can take a look and play around with configurations if you'd like to. Maybe I am missing something.

@ghislainfourny
Copy link
Member

Thanks, Can! I think the resource datasets are less than I imagined in size, which may be good news. In any case, what you did is really useful because now that we have this XML configuration file, it will make it easier for us to fine tune the parameters of the assembly in the future.

What would also need to be done is to move datasets and queries to src/test/resources, and have src/main/resources only contain the banner file. This is the standard Java layout.

@CanBerker
Copy link
Collaborator Author

I think the resource datasets are less than I imagined in size

To be precise, src/main/resources/queries is exactly at 336 KB at the moment. I believe the increasing size of the JAR is mostly caused by the increasing number of our dependencies since we are packing those in. I remember that at the time of our initial discussion, you had stated that the jar had become 8 MBs instead of 4. Now the size has grown ~15MBs.

now that we have this XML configuration file, it will make it easier for us to fine tune the parameters of the assembly in the future.

This is exactly the reason why I wanted to put this PR in place. I'm glad we are on the same page.

@ghislainfourny One important remark is that our custom assembly currently results in a slightly bigger size.
Default assembly: 15764 KB
Custom assembly: 16424 KB

What would also need to be done is to move datasets and queries to src/test/resources, and have src/main/resources only contain the banner file. This is the standard Java layout.

I will take a look at this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0