added allocations feature
Using this feature,
an event subscriber can see
how many number of objects were allocated
during the event’s start time and end time.
We have written in detail about this feature
By taking the benefit of this feature,
Rails 6 now reports the allocations made
rendering a view template,
Notice the Allocations: information in the above logs.
We can see that
6 objects were allocated while rendering
shared/_ad_banner.html.erb view partial,
805 objects were allocated while rendering
a collection of 100 articles/_article.html.erb view partials,
and 3901 objects were allocated
while rendering articles/index.html.erb view template.
We can use this information
understand how much time was spent
while rendering a view template
how many objects were allocated in the process’ memory
between the time when that view template had started rendering
the time when that view template had finished rendering.