diff options
author | schneems <richard.schneeman@gmail.com> | 2015-07-24 22:32:01 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2015-07-29 20:41:57 -0500 |
commit | 83ee043c6834914607849ae9cd3b9eab6b41702c (patch) | |
tree | 06994e7775e6ba8d685bc0c813484b225d315bcb /activesupport/test/multibyte_test_helpers.rb | |
parent | 1bf50badd943e684a56a03392ef0ddafefca0ad7 (diff) | |
download | rails-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/multibyte_test_helpers.rb')
0 files changed, 0 insertions, 0 deletions