[11:40:31] Krinkle: Lucas_WMDE: I briefly experimented with an "automatic" newLazyProxy integration in wikimedia/service-container like so: [11:41:37] I added an optional classname param to getService(), and made the container create a lazy proxy wrapping createService() if set and referring to an instantiable class. [11:42:15] I then updated MediaWikiServices to pass in this param for every service getter where the return type is known, and used the following PHPUnit test with an arbitrary selected service with deep dependencies to measure the impact: [11:42:22] https://www.irccloud.com/pastebin/meGLBJRf/ [11:42:48] on my machine, the instantiation cost of this service is ~20ms - with a lazy proxy, around 0.4ms [11:43:43] I might test with a simple web entrypoint next to see how it behaves with opcache though [11:49:57] the eyewatering 20ms figure definitely has parsing and other initial costs in it since it is much reduced when averaging over 100 iterations with a container reset inbetween [11:52:42] there's also the caveat that the type of the proxy must exactly match the type returned by its wrapped callable [11:53:01] so you can't have a Language proxy return LanguageEn from its callable, or PHP will error [15:42:40] Grafana slowness - https://phabricator.wikimedia.org/T371102