2015/07/30分のコミットです。
CHANGELOGへの追加はありませんでした。
Make silence a warning inserted by commit #4b3f8ac
actionmailer/test/i18n_with_controller_test.rb
の修正です。
Add deprecation warning for render :text
の対応により、send_mail
を使用したテストで
deprecation warningが出るようになってしまったので、ActiveSupport::Deprecation.silence
メソッドを使用してwarningメッセージ表示されないよう対応しています。
Fix reported regression rails/sprockets-rails#265
railties/test/application/assets_test.rb
の修正です。
実際必要になるまでcompressorsをロードしない事を確認するテストが、sprockets-railsのFix performance regression in Rails helper by eileencodes · Pull Request #265 · rails/sprockets-railsによりコケるようになってしまったのを対応しています。
上記 sprcoket-railsのコミットは、app/assets
をload pathに追加したAdd app/assets
to the load path. by lucasmazza · Pull Request #232 · rails/sprockets-railsの対応により、大きなperformance regression(Adding app/ to the asset path is a large performance regression · Issue #234 · rails/sprockets-rails)が発生してしまい、その対応として行われたコミットでした。
assets precompileをチェックする対象が増えてしまったことによりperformance regressionが発生してしまったようで、Fix performance regression in Rails helper by eileencodes · Pull Request #265 · rails/sprockets-railsではprecompiled_assets
を明示的に指定出来るようにし、performance regressionに対応しています。(precompiled_assets
が設定されていた場合はassets precompileが実行されない為。テスト実行時に使う想定かな)
その対応の影響で、assets.compile
がtrueの場合、必ずassets.precompile
を参照するようになってしまい、assets.compile
がtrueなのに、assets.precompile
が設定されていない為、エラーになりテストがコケてしまっていした。
とりあえずテストについては、assets.precompile = []
を設定し、対応したようです。
railties/test/application/rake/notes_test.rb
の修正です。
こちらも先のコミット同様、 config.assets.precompile
を設定するよう修正しています。
Decrease string allocations on AR#respond_to?
activerecord/lib/active_record/attribute_methods.rb
の修正です。
ActiveRecord#respond_to?
メソッドで、引数のnameに:to_partial_path
、または:to_model
が渡された場合、Stringへの変換処理を行わないよう修正しています。
String objectのインスタンス生成を削減し、性能改善のための対応です。
以降、同様に性能改善のコミットが続きます。
Decrease string allocations in apply_inflections
activesupport/lib/active_support/inflector/inflections.rb
、
activesupport/lib/active_support/inflector/methods.rb
の修正です。
apply_inflections
メソッドに、不可算な値が指定された場合、不要なStringの変換処理(downcase、空白の除去)等を行わないよう修正しています。
Decrease string allocations in url_options
actionpack/lib/action_controller/metal/url_for.rb
の修正です。
url_options
メソッドで、script_name
が空だった場合に不要なString objectを生成しないよう修正しています。
Speed up journey extract_parameterized_parts
actionpack/lib/action_dispatch/journey/formatter.rb
の修正です。
reverse.drop_while
を使用していた箇所をreverse_each.drop_while
に修正しています。
reverse_each
の方がオブジェクト生成を行わないので早いとの事。
actionpack/lib/action_dispatch/journey/formatter.rb
の修正です。
missing_keys
メソッドで、不要なRegex objectを生成しないで済むよう、keyのチェック処理を改善しています。
Decrease route_set allocations
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
不要なArrayのインスタンスを生成しないよう処理を修正しています。
Reduce hash allocations in route_set
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
コンストラクタで引数のrecall
をdupしていたのを、dupしないよう修正しています。
テストは通ったのでおそらく問題無いだろう、とのですが、何か問題があったらrevertしてとの事です。
Decrease string allocation in content_tag_string
actionview/lib/action_view/helpers/tag_helper.rb
の修正です。
固定で使用している文字列をfreeze
して、String objectを使いまわすよう修正しています。
actionview/lib/action_view/helpers/url_helper.rb
の修正です。
固定で使用している文字列をfreeze
して、String objectを使いまわすよう修正しています。
Cut string ActionView template allocations
actionview/lib/action_view/template.rb
の修正です。
固定で使用している文字列をfreeze
して、String objectを使いまわすよう修正しています。
Cut string allocations in content_tag_string
ActionView helpers配下まとめての修正です。
固定で使用している文字列をfreeze
して、String objectを使いまわすよう修正しています。
性能改善対応のコミットはここまで。
Remove yepnope mention from form helpers guide because it's deprecated [ci skip]
rails guideのForm Helpers
の修正です。
Other Helpers of Interest
の項、外部ツールについて説明している箇所からdeprecateになっているyepnope.js | A Conditional Loader For Your Polyfills! を削除しています。