提交 1a14074f 编写于 作者: S schneems

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.
上级 0cbec58a
......@@ -598,7 +598,7 @@ class Generator
def initialize(named_route, options, recall, set)
@named_route = named_route
@options = options.dup
@options = options
@recall = recall.dup
@set = set
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册