Eager autoload ActiveSupport::ExecutionContext

ExecutionContext was added as a regular autoload when it was introduced
in 6bad959. However, the class is not currently referenced anywhere on
the boot path. This means that the file will currently be required
during the first request/job/query (currently its loaded when the to_run
callback defined in active_support.reset_execution_context is executed).

To maximize CoW and ensure that the first request/job/query doesn't have
any extra latency, ExecutionContext should be eager autoloaded instead.
This commit is contained in:
Hartley McGuire 2022-12-18 23:00:04 -05:00
parent cd762a8d37
commit daff36c157
No known key found for this signature in database
GPG Key ID: E823FC1403858A82

@ -41,7 +41,6 @@ module ActiveSupport
autoload :CurrentAttributes
autoload :Dependencies
autoload :DescendantsTracker
autoload :ExecutionContext
autoload :ExecutionWrapper
autoload :Executor
autoload :ErrorReporter
@ -64,6 +63,7 @@ module ActiveSupport
autoload :Configurable
autoload :Deprecation
autoload :Digest
autoload :ExecutionContext
autoload :Gzip
autoload :Inflector
autoload :JSON