1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/lib/action_view
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
..
helpers [ci skip] Doc ActionView::OutputBuffer 2018-09-06 15:28:45 -05:00
locale
renderer Merge pull request #30647 from droptheplot/render-partials-string-locals 2018-04-27 19:17:36 -04:00
tasks Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
template Permit list usage cleanup and clearer documentation 2018-08-27 09:51:46 -04:00
testing [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
base.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
buffers.rb [ci skip] Doc ActionView::OutputBuffer 2018-09-06 15:28:45 -05:00
context.rb ActionController -> Action Controller [ci skip] 2018-04-17 12:14:10 +02:00
dependency_tracker.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
digestor.rb Don’t allocate array on no args 2018-09-07 17:33:10 -05:00
flows.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
gem_version.rb Start Rails 6.0 development!!! 2018-01-30 18:51:17 -05:00
helpers.rb Remove RecordTagHelper 2018-04-07 09:28:01 +09:00
layouts.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
log_subscriber.rb [Action View] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
lookup_context.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
model_naming.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
path_set.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
railtie.rb Add action_view.finalize_compiled_template_methods config option 2018-04-02 20:50:33 +01:00
record_identifier.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
rendering.rb [Action View] require_relative => require 2017-10-21 22:48:28 +09:00
routing_url_for.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
template.rb Use :default option in order to set default value of finalize_compiled_template_methods 2018-04-03 16:40:23 +03:00
test_case.rb Fix some typos. 2017-10-10 23:08:03 -04:00
version.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
view_paths.rb Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00