Skip to content

Commit daff36c

Browse files
committed
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.
1 parent cd762a8 commit daff36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/lib/active_support.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ module ActiveSupport
4141
autoload :CurrentAttributes
4242
autoload :Dependencies
4343
autoload :DescendantsTracker
44-
autoload :ExecutionContext
4544
autoload :ExecutionWrapper
4645
autoload :Executor
4746
autoload :ErrorReporter
@@ -64,6 +63,7 @@ module ActiveSupport
6463
autoload :Configurable
6564
autoload :Deprecation
6665
autoload :Digest
66+
autoload :ExecutionContext
6767
autoload :Gzip
6868
autoload :Inflector
6969
autoload :JSON

0 commit comments

Comments
 (0)