aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/reloader.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2015-07-24 22:38:34 -0500
committerschneems <richard.schneeman@gmail.com>2015-07-29 20:41:57 -0500
commit9b8258814e695fe7fbb728456498fd0fd8709f5c (patch)
tree00f25ca7276928946dc7b8cefc8d44f6a974ef92 /actionpack/lib/action_dispatch/middleware/reloader.rb
parent83ee043c6834914607849ae9cd3b9eab6b41702c (diff)
downloadrails-9b8258814e695fe7fbb728456498fd0fd8709f5c.tar.gz
rails-9b8258814e695fe7fbb728456498fd0fd8709f5c.tar.bz2
rails-9b8258814e695fe7fbb728456498fd0fd8709f5c.zip
Speed up journey extract_parameterized_parts
Micro optimization: `reverse.drop_while` is slower than `reverse_each.drop_while`. This doesn't save any object allocations. Second, `keys_to_keep` is typically a very small array. The operation `parameterized_parts.keys - keys_to_keep` actually allocates two arrays. It is quicker (I benchmarked) to iterate over each and check inclusion in array manually. This change buys us 1774 fewer objects per request
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/reloader.rb')
0 files changed, 0 insertions, 0 deletions