Created
February 27, 2014 03:47
-
-
Save srawlins/9244013 to your computer and use it in GitHub Desktop.
Reduce allocations during mail gem's specs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before: | |
Top 10 allocation sites: | |
String allocations at <PWD>/lib/mail/utilities.rb:180 | |
4639 allocations during ./spec/mail/attachments_list_spec.rb:312 | |
... | |
Array allocations at <PWD>/lib/mail/parsers/received_parser.rb:13 | |
2326 allocations during ./spec/mail/message_spec.rb:1627 | |
... | |
String allocations at <PWD>/lib/mail/fields/common/common_field.rb:46 | |
2269 allocations during ./spec/mail/fields/content_type_field_spec.rb:198 | |
... | |
Array allocations at <PWD>/lib/mail/parsers/content_type_parser.rb:17 | |
2268 allocations during ./spec/mail/fields/content_type_field_spec.rb:198 | |
... | |
String allocations at <PWD>/lib/mail/message.rb:1972 | |
2188 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
String allocations at <PWD>/lib/mail/fields/common/parameter_hash.rb:20 | |
2030 allocations during ./spec/mail/attachments_list_spec.rb:312 | |
... | |
String allocations at <PWD>/lib/mail/mail.rb:238 | |
2016 allocations during ./spec/mail/fields/content_type_field_spec.rb:198 | |
... | |
String allocations at <PWD>/lib/mail/encodings.rb:50 | |
1756 allocations during ./spec/mail/network/retriever_methods/test_retriever_spec.rb:78 | |
... | |
String allocations at <PWD>/lib/mail/field.rb:118 | |
1325 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
MatchData allocations at <PWD>/lib/mail/utilities.rb:180 | |
1292 allocations during ./spec/mail/attachments_list_spec.rb:312 | |
... | |
Total allocations: 855530 | |
After changes to 11x files in lib/mail: | |
Top 10 allocation sites: | |
String allocations at <PWD>/lib/mail/field.rb:118 | |
2168 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
String allocations at <PWD>/lib/mail/fields/common/parameter_hash.rb:20 | |
2030 allocations during ./spec/mail/attachments_list_spec.rb:312 | |
... | |
String allocations at <PWD>/lib/mail/fields/common/common_field.rb:47 | |
2017 allocations during ./spec/mail/fields/content_type_field_spec.rb:198 | |
... | |
String allocations at <PWD>/lib/mail/mail.rb:238 | |
1512 allocations during ./spec/mail/fields/content_type_field_spec.rb:198 | |
... | |
String allocations at <PWD>/lib/mail/utilities.rb:183 | |
1331 allocations during ./spec/mail/attachments_list_spec.rb:312 | |
... | |
String allocations at <PWD>/lib/mail/header.rb:251 | |
1173 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
String allocations at <PWD>/lib/mail/field.rb:132 | |
1121 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
String allocations at <PWD>/lib/mail/header.rb:259 | |
1085 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
Mail::Field allocations at <PWD>/lib/mail/header.rb:92 | |
1085 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
MatchData allocations at <PWD>/lib/mail/field.rb:118 | |
1084 allocations during ./spec/mail/message_spec.rb:77 | |
... | |
Total allocations: 613593 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment