aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/gzip_test.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2015-07-24 22:32:01 -0500
committerschneems <richard.schneeman@gmail.com>2015-07-29 20:41:57 -0500
commit83ee043c6834914607849ae9cd3b9eab6b41702c (patch)
tree06994e7775e6ba8d685bc0c813484b225d315bcb /activesupport/test/gzip_test.rb
parent1bf50badd943e684a56a03392ef0ddafefca0ad7 (diff)
downloadrails-83ee043c6834914607849ae9cd3b9eab6b41702c.tar.gz
rails-83ee043c6834914607849ae9cd3b9eab6b41702c.tar.bz2
rails-83ee043c6834914607849ae9cd3b9eab6b41702c.zip
Decrease string allocations in url_options
The request.script_name is dup-d which allocates an extra string. It is most commonly an empty string "". We can save a ton of string allocations by checking first if the string is empty, if so we can use a frozen empty string instead of duplicating an empty string. This change buys us 35,714 bytes of memory and 893 fewer objects per request.
Diffstat (limited to 'activesupport/test/gzip_test.rb')
0 files changed, 0 insertions, 0 deletions