1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support
Andrew White 9128ba5cd4 Cache to_time to improve performance when comparing
In #25880 we tried to cache localtime to fix the performance
regression but that proved to be difficult due to the fact that
localtime/getlocal can take a utc_offset argument. We tried
caching based on the argument but since the argument can be nil
sometimes that meant that if the TZ environment variable changed
then the cached value for nil became invalid. By moving the
caching to DateAndTime#compatibility we don't have to worry about
arguments since it doesn't take any.

There is a possible edge condition where preserve_timezone is set
to false and the system timezone changes then it could result in
a cached value being incorrect but the only way to fix this would
be to remove all caching and live with the performance issue.
2016-10-02 17:15:44 +01:00
..
cache Remove the word "mongrel" from documents 2016-09-07 01:59:37 +09:00
concurrency Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
core_ext Cache to_time to improve performance when comparing 2016-10-02 17:15:44 +01:00
dependencies applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
deprecation applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
duration Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
inflector Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
json modernizes hash syntax in activesupport 2016-08-06 19:38:33 +02:00
locale Add support for Petabyte and Exabyte in number to human size 2015-12-22 23:07:06 +05:30
log_subscriber normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
multibyte Remove dead constants 2016-09-06 21:58:34 +09:00
notifications fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
number_helper applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
testing fffffff, Add code missing in 29f0fbd 2016-09-25 20:38:12 +02:00
values Add three new rubocop rules 2016-08-16 04:30:11 -03:00
xml_mini Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
all.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
array_inquirer.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
backtrace_cleaner.rb Remove the word "mongrel" from documents 2016-09-07 01:59:37 +09:00
benchmarkable.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
builder.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
cache.rb Merge pull request #26524 from y-yagi/add_check_of_argument 2016-09-22 09:29:25 -05:00
callbacks.rb Tighten the backtrace pollution from passing through callbacks 2016-09-30 06:57:43 +09:30
concern.rb Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes 2015-06-12 17:35:21 +02:00
configurable.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
core_ext.rb
dependencies.rb fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
deprecation.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
descendants_tracker.rb
duration.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
evented_file_update_checker.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
execution_wrapper.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
executor.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
file_update_checker.rb Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
gem_version.rb Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
gzip.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
hash_with_indifferent_access.rb code gardening: removes redundant selfs 2016-08-08 01:12:38 +02:00
i18n.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
i18n_railtie.rb Fix Remaining Case-In-Assignment Statement Formatting 2016-09-06 09:34:09 -05:00
inflections.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
inflector.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
json.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
key_generator.rb Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
lazy_load_hooks.rb [ci skip] Use class name instead of path to file 2016-09-28 23:31:54 +03:00
log_subscriber.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
logger.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
logger_silence.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
logger_thread_safe_level.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
message_encryptor.rb Start passing cipher from EncryptedCookieJar since we use it to determine key length 2016-09-01 03:00:10 +05:30
message_verifier.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
multibyte.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
notifications.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
number_helper.rb number_to_phone formats number with regexp 2016-04-02 20:13:22 +08:00
option_merger.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
ordered_hash.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
ordered_options.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
per_thread_registry.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
proxy_object.rb
rails.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
railtie.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
reloader.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
rescuable.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
security_utils.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
string_inquirer.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
subscriber.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
tagged_logging.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
test_case.rb Move custom assertion to its proper place 2016-08-27 08:33:08 +05:30
time.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
time_with_zone.rb Revert "Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time" 2016-10-02 17:02:27 +01:00
version.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
xml_mini.rb Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00