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

Use into {} instead of apply hash-map #3

Closed
wants to merge 1 commit into from

Conversation

jerrypnz
Copy link

@jerrypnz jerrypnz commented Dec 4, 2012

I use nippy in production and found an OOM issue caused by the deserialization of a huge map, after monitoring the application for a while, I found it is caused by nippy.

For huge maps, apply may cause OOM, because it will realize all the elements of the arglist seq, and construct an Object[] to hold them.

I changed this line and use (into {} ...) instead of (apply hash-map ...), and it works. The OOM issue could be avoided by this.

For huge maps, `apply` may cause OOM, because it will realize all
the elements of the arglist seq, and construct an Object[] to hold
them.
@ptaoussanis
Copy link
Member

Hi Jerry,

Thanks for the heads-up! I've made some changes for performance and have just pushed 1.0.1-SNAPSHOT to Clojars and the dev branch: c2c4616.

Please take a look and let me know if that solves the issue?

Cheers!

@ptaoussanis
Copy link
Member

1.0.1 pushed to Clojars & master.

@ptaoussanis ptaoussanis closed this Dec 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants