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

get rid of a needless step in HashWithIndifferentAccess #1940

Merged
merged 1 commit into from
Dec 4, 2019
Merged

get rid of a needless step in HashWithIndifferentAccess #1940

merged 1 commit into from
Dec 4, 2019

Conversation

dnesteryuk
Copy link
Member

There was an extra operation in Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder it is unnecessary, people already use Rails 4, 5 or 6. Devs who are on Rails 3 less likely will upgrade to latest Grape.

After removing that operation Grape consumes less memory.

Before: 36080 bytes
After: 32472 bytes

There was an extra operation in
`Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder`
it is unnecessary, people already use Rails 4, 5 or 6. Devs who are on Rails 3
less likely will upgrade to latest Grape.

After removing that operation Grape consumes less memory.

Before: 36080 bytes
After:  32472 bytes
@grape-bot
Copy link

grape-bot commented Dec 3, 2019

1 Warning
⚠️ There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.

Generated by 🚫 danger

@dblock
Copy link
Member

dblock commented Dec 4, 2019

So effectively by doing this we're removing support for Rails 3? Which we didn't really talk about before or test against. Maybe we want to be extra cautious and write it in UPGRADING or CHANGELOG? I'll merge this as is though.

@dblock dblock merged commit 41dced0 into ruby-grape:master Dec 4, 2019
@dnesteryuk dnesteryuk deleted the chore/micro-optimization-2 branch December 4, 2019 07:07
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.

3 participants