diff options
author | schneems <richard.schneeman@gmail.com> | 2015-07-24 23:27:35 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2015-07-29 20:41:57 -0500 |
commit | 1a14074fb525cde4a439a1fb7515fe417c37ff96 (patch) | |
tree | 946ab830a618370036698d4e462ac3e31ef9f5ef | |
parent | 0cbec58ae48279ae5e9fdf6bbdbceb32183215dd (diff) | |
download | rails-1a14074fb525cde4a439a1fb7515fe417c37ff96.tar.gz rails-1a14074fb525cde4a439a1fb7515fe417c37ff96.tar.bz2 rails-1a14074fb525cde4a439a1fb7515fe417c37ff96.zip |
Reduce hash allocations in route_set
When generating a url with `url_for` the hash of arguments passed in, is dup-d and merged a TON. I wish I could clean this up better, and might be able to do it in the future. This change removes one dup, since it's literally right after we just dup-d the hash to pass into this constructor.
This may be a breaking, change but the tests pass...so :shipit: we can revert if it causes problems
This change buys us 205,933 bytes of memory and 887 fewer objects per request.
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 43e35366a9..d93989a449 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -598,7 +598,7 @@ module ActionDispatch def initialize(named_route, options, recall, set) @named_route = named_route - @options = options.dup + @options = options @recall = recall.dup @set = set |