From 1a14074fb525cde4a439a1fb7515fe417c37ff96 Mon Sep 17 00:00:00 2001 From: schneems Date: Fri, 24 Jul 2015 23:27:35 -0500 Subject: 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. --- actionpack/lib/action_dispatch/routing/route_set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') 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 -- cgit v1.2.3