1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/test/activerecord
schneems 1bd578ffe6 Don’t allocate array on no args
When no dependencies are present to be digested there is no reason to build an array just to turn around and turn it back into a string.

The dependencies array is not mutated in this method so we can use the same empty array across all invocations.

Total allocated: 791402 bytes (7294 objects)
Total allocated: 777442 bytes (7132 objects)

(791402 - 777442) / 791402.0 # => 1.76 % speed improvement
2018-09-07 17:33:10 -05:00
..
controller_runtime_test.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
debug_helper_test.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
form_helper_activerecord_test.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
multifetch_cache_test.rb Only preload misses on multifetch cache 2018-03-06 14:10:45 +11:00
polymorphic_routes_test.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
relation_cache_test.rb Don’t allocate array on no args 2018-09-07 17:33:10 -05:00
render_partial_with_record_identification_test.rb Remove unused methods from RenderPartialWithRecordIdentificationController 2017-09-30 17:38:27 +09:00