Skip to content
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

Reducing the dependency footprint #176

Open
scarytom opened this issue Jun 6, 2024 · 2 comments
Open

Reducing the dependency footprint #176

scarytom opened this issue Jun 6, 2024 · 2 comments

Comments

@scarytom
Copy link

scarytom commented Jun 6, 2024

I'm using nippy without any compression. It would be nice to exclude the dependencies that are (I think) only required for compression, and keep the dependency footprint smaller. At the moment, if I exclude these dependencies, then compilation fails. I guess the code could be re-worked to dynamically reference classes in these libs? Happy to experiment with this and do a pull request if you think it is acceptable to do this.

nippy/project.clj

Lines 13 to 14 in 5a9a391

[org.tukaani/xz "1.9"]
[io.airlift/aircompressor "0.27"]]

@ptaoussanis
Copy link
Member

@scarytom Hi Tom! Would be happy to look at a PR that makes these optional if it's pretty simple and doesn't negatively impact current users 👍

scarytom added a commit to scarytom/nippy that referenced this issue Jun 6, 2024
Use reflective calls to interact with org.tukaani/xz and io.airlift/aircompressor so that users of nippy can choose
to exclude those dependencies if they aren't using compression.

Reflective calls are much slower, and some type-hints were also removed, so these changes might affect performance.
@scarytom
Copy link
Author

scarytom commented Jun 6, 2024

I quickly put a pull-request together, just to show you what it would look like before refining anything too much. I'm concerned that these changes might affect performance, which is obviously a big deal, so benchmarking definitely required.

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

No branches or pull requests

2 participants