Enforce lazy creation in RouteHandlerContext #84763
Labels
enhancement
New value added to drive a business result
performance
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
The current implementation of
RouteHandlerContext
extends context eagerly even if this API is not used. It creates unnecessary pressure on the CPU & Garbage collector. #78957 madecore
context provider lazy, but other providers are still created immediately.Context
core service should enforce instantiation on demand, which might require changing theIContextProvider
interface.For example, we can make
IContextProvider
function sync to call it lazily during access time.The main reason why
IContextProvider
is async - some plugins accessgetCoreServices
thereThe text was updated successfully, but these errors were encountered: