mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
99d260298c
On every iteration of generating a cache for a collection a “digest path” is calculated even though it’s exactly the same for every element. This PR exposes a method `digest_path_from_virtual` that returns back a “digest_path”. This can in turn be passed back into `cache_fragment_name`. This not only does less work, but it also (you guessed it) uses less memory. before: Total allocated: 762539 bytes (7035 objects) after: Total allocated: 743590 bytes (6621 objects) (762539 - 743590)/ 762539.0 # => 2.4% faster ⚡️⚡️ |
||
---|---|---|
.. | ||
action_view | ||
action_view.rb |