diff options
author | Stan Lo <a22301613@yahoo.com.tw> | 2017-02-07 00:31:44 +0800 |
---|---|---|
committer | Stan Lo <a22301613@yahoo.com.tw> | 2017-02-07 00:41:02 +0800 |
commit | dde7134e07cb84f2efcf9704de144ef9ed38d360 (patch) | |
tree | ffebf9e8e045960c11b6a14d1a3cd8a433fe1e22 /tasks | |
parent | e3afc83631ebe2dbb3c4368756577bdd92ea1d62 (diff) | |
download | rails-dde7134e07cb84f2efcf9704de144ef9ed38d360.tar.gz rails-dde7134e07cb84f2efcf9704de144ef9ed38d360.tar.bz2 rails-dde7134e07cb84f2efcf9704de144ef9ed38d360.zip |
Freeze fragment cache related instrument name.
ActionMailer::Base#instrument_name and
ActionController::Base#instrument_name will be frequently called once
caching is enabled. So it's better to freeze them instead of create new
string on every call.
Also, the instrument name in #instrument_fragment_cache will usually
be "write_fragment.action_controller" or
"read_fragment.action_controller". So freezing them might also gain some
performance improvement. We have done something like this in other places:
https://github.com/rails/rails/blob/master/actionview/lib/action_view/template.rb#L348
Diffstat (limited to 'tasks')
0 files changed, 0 insertions, 0 deletions