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

Conversation

@dnesteryuk
Copy link
Member

dnesteryuk commented Dec 3, 2019

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

This comment has been minimized.

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

This comment has been minimized.

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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dnesteryuk dnesteryuk deleted the dnesteryuk:chore/micro-optimization-2 branch Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.