OrchardCore
OrchardCore copied to clipboard
Move initialization of the ExtensionManager into the c'tor
The initialization of the ExtensionManager
is synchronous and must always be run before any method can be called. It can therefore be moved into the constructor to avoid a check before any method call.
This is a minor performance optimization, but EnsureInitialized
was called at least once during every request and on some requests dozens of times.
I based this optimization on PR #16379.