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

Private #hash method is slow #27

Open
botandrose opened this issue Dec 2, 2015 · 0 comments
Open

Private #hash method is slow #27

botandrose opened this issue Dec 2, 2015 · 0 comments

Comments

@botandrose
Copy link

Heya, thanks for equalizer!

Was debugging a performance issue today and noticed that ~25% of the request time was taken up by repeated calls to equalizer's #hash method when I was using an equalized value object as a hash key. It also appears that ~60% of that ~25% was calling #to_proc on method(:send), so caching the proc'ed send in a constant or something may help. As a comparison, switching to using a stringified version of my value object as the hash key was relatively free... i.e. subsequent requests sped up by ~25%.

Not a deal breaker, just a heads-up. Attached a screenshot of the flamegraph in case it helps.

screenshot from 2015-12-01 17 42 59

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

No branches or pull requests

1 participant