I got curious about what the _Allocations_ number in Rails 6 log output actually refers to.

I got curious about what the _Allocations_ number in Rails 6 log output actually refers to. Turns out they just run `GC.stat :total_allocated_objects` before and after rendering the template and then subtract the difference (details: https://github.com/rails/rails ... 23L159)
You already invited:

megcaicai

Upvotes from:

Sometimes you’d be surprised how many thousands of array/hash/string allocations all that configuration, and parameter parsing can get up to. We’ve had at least one issue related to nested iterations that caused a performance issue in the past, with much increased RAM usage, so I’m pretty pleased this is exposed.

If you wanna answer this question please Login or Register