DEV Community

Grape: The cost of ActiveSupport::HashWithIndifferentAccess

Dmitriy Nesteryuk on December 08, 2019

By default Grape uses ActiveSupport::HashWithIndifferentAccess as a parameter builder. The most important thing about ActiveSupport::HashWithIndiff...
Collapse
 
dylanjha profile image
Dylan Jhaveri

The bit of memory overhead is good to know about, and certainly not good, but it would be interesting to see how the memory overhead performs in the real world.

If the extra bytes get garbage collected efficiently after the request is over then the overhead per request might not make a difference when your application is running in production.

On the other hand, Rails memory bloat happens pretty easily so it's also possible that this extra memory per request does cause problems. It would be interesting to see.