LazyServiceFactoryinstantiation logic look like?
'lazy_services' => [ // Mapping services to their class names is required // since the ServiceManager is not a declarative DIC. 'class_map' => [ Zend\Expressive\Template\TemplateRendererInterface::class => Zend\Expressive\Template\TemplateRendererInterface::class, ], // directory where proxy classes will be written - default to system_get_tmp_dir() 'proxies_target_dir' => 'data/cache/proxymanager', // namespace of the generated proxies, default to "ProxyManagerGeneratedProxy" 'proxies_namespace' => 'ProxyManagerGeneratedProxy', // whether the generated proxy classes should be written to disk or generated on-the-fly 'write_proxy_files' => true, ], 'delegators' => [ // we don't need the template renderer every request e.g. POST and we can initialize the locale via a middleware // the problem is that Twig loads all extensions if the render is created Zend\Expressive\Template\TemplateRendererInterface::class => [ \Zend\ServiceManager\Proxy\LazyServiceFactory::class, ], ],
php -dxdebug.profiler_enable_trigger=1 -S localhost:8080 -t publicand see where it is hanging.
@Ocramius I had to disable the library again. During peak hours it is not really making a big difference due to the load in our servers. Where would you recommend me to doing the following?
$config = new \ProxyManager\Configuration();
I currently have this set on AppKernel at initializeContainer() but maybe this is not the correct place to do it...