diff options
author | schneems <richard.schneeman@gmail.com> | 2015-07-25 00:18:13 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2015-07-29 20:41:58 -0500 |
commit | e76a84350595ca6772d3c00f456b35e411fba6c1 (patch) | |
tree | 0c7b8bf9c2d3b361dcd2d640f4daf306dcb751b2 /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | 9b189a31696b6572ffb8164f1f3041d57e8eeebe (diff) | |
download | rails-e76a84350595ca6772d3c00f456b35e411fba6c1.tar.gz rails-e76a84350595ca6772d3c00f456b35e411fba6c1.tar.bz2 rails-e76a84350595ca6772d3c00f456b35e411fba6c1.zip |
Cut string allocations in content_tag_string
content_tag's first argument is will generate a string with an html tag so `:a` will generate: `<a></a>`. When this happens, the symbol is implicitly `to_s`-d so a new string is allocated. We can get around that by using a frozen string instead which
This change buys us 74,236 bytes of memory and 1,855 fewer objects per request.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
0 files changed, 0 insertions, 0 deletions