Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce object allocation. #801

Merged
merged 1 commit into from Feb 19, 2015
Merged

Conversation

tgxworld
Copy link
Contributor

Before:

[[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113158, 342, 114877, 0, 28, 5989110]]
[["rack/lib/rack/utils.rb", 87, :T_STRING], [110615, 57, 108492, 0, 28, 12576892]]
[["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59564, 0, 58024, 0, 1, 2304160]]
[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [56601, 0, 55128, 0, 2, 2189560]]
[["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54652, 0, 53229, 0, 2, 5830250]]
[["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53606, 0, 52222, 0, 1, 2073520]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50621, 16, 49447, 0, 22, 8126520]]
[["rack/lib/rack/utils.rb", 89, :T_STRING], [41706, 0, 40620, 0, 2, 1613360]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [41694, 0, 40618, 0, 1, 4676888]]
[["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [41690, 0, 40612, 0, 1, 1612560]]

[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [56601, 0, 55128, 0, 2, 2189560]]
After:

[[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113994, 348, 116830, 0, 28, 6032912]]
[["rack/lib/rack/utils.rb", 87, :T_STRING], [111363, 58, 110247, 0, 28, 12668100]]
[["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59996, 0, 58968, 0, 1, 2321120]]
[["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54964, 0, 54050, 0, 1, 5870020]]
[["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53990, 0, 53070, 0, 1, 2088880]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50989, 11, 50231, 0, 25, 8188064]]
[["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [42006, 0, 41282, 0, 1, 1624960]]
[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [42002, 0, 41278, 0, 2, 1624880]]
[["rack/lib/rack/utils.rb", 89, :T_STRING], [42002, 0, 41279, 0, 2, 1624880]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [42000, 0, 41286, 0, 1, 4712384]]

[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [42002, 0, 41278, 0, 2, 1624880]]

Before:
```
[[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113158, 342, 114877, 0, 28, 5989110]]
[["rack/lib/rack/utils.rb", 87, :T_STRING], [110615, 57, 108492, 0, 28, 12576892]]
[["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59564, 0, 58024, 0, 1, 2304160]]
[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [56601, 0, 55128, 0, 2, 2189560]]
[["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54652, 0, 53229, 0, 2, 5830250]]
[["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53606, 0, 52222, 0, 1, 2073520]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50621, 16, 49447, 0, 22, 8126520]]
[["rack/lib/rack/utils.rb", 89, :T_STRING], [41706, 0, 40620, 0, 2, 1613360]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [41694, 0, 40618, 0, 1, 4676888]]
[["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [41690, 0, 40612, 0, 1, 1612560]]
```
After:
```
[[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113994, 348, 116830, 0, 28, 6032912]]
[["rack/lib/rack/utils.rb", 87, :T_STRING], [111363, 58, 110247, 0, 28, 12668100]]
[["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59996, 0, 58968, 0, 1, 2321120]]
[["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54964, 0, 54050, 0, 1, 5870020]]
[["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53990, 0, 53070, 0, 1, 2088880]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50989, 11, 50231, 0, 25, 8188064]]
[["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [42006, 0, 41282, 0, 1, 1624960]]
[["rack/lib/rack/utils.rb", 89, :T_ARRAY], [42002, 0, 41278, 0, 2, 1624880]]
[["rack/lib/rack/utils.rb", 89, :T_STRING], [42002, 0, 41279, 0, 2, 1624880]]
[["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [42000, 0, 41286, 0, 1, 4712384]]
```
@tgxworld
Copy link
Contributor Author

cc/ @tenderlove

tenderlove added a commit that referenced this pull request Feb 19, 2015
@tenderlove tenderlove merged commit 97795d4 into rack:master Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants