From 955b9ede33c5696173a760ea271ec32d79e843b9 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Thu, 11 Feb 2016 13:18:30 +0100 Subject: [ticket/14462] Further speed improvements - Cache the secondary container - Only initialize tasks/modules that are being used - Add timeout error message in the AJAX UI PHPBB3-14462 --- phpBB/phpbb/install/helper/container_factory.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'phpBB/phpbb/install/helper/container_factory.php') diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php index 6c1ecd2d02..5cf4f8a283 100644 --- a/phpBB/phpbb/install/helper/container_factory.php +++ b/phpBB/phpbb/install/helper/container_factory.php @@ -13,7 +13,6 @@ namespace phpbb\install\helper; -use phpbb\cache\driver\dummy; use phpbb\install\exception\cannot_build_container_exception; use phpbb\language\language; use phpbb\request\request; @@ -157,25 +156,20 @@ class container_factory ->with_environment('production') ->with_config($phpbb_config_php_file) ->with_config_path($config_path) - ->without_cache() ->without_compiled_container() ->get_container(); // Setting request is required for the compatibility globals as those are generated from // this container - $this->container->register('request')->setSynthetic(true); - $this->container->set('request', $this->request); - - $this->container->register('language')->setSynthetic(true); - $this->container->set('language', $this->language); - - // Replace cache service, as config gets cached, and we don't want that when we are installing - if (!is_dir($other_config_path)) + if (!$this->container->isFrozen()) { - $this->container->register('cache.driver')->setSynthetic(true); - $this->container->set('cache.driver', new dummy()); + $this->container->register('request')->setSynthetic(true); + $this->container->register('language')->setSynthetic(true); } + $this->container->set('request', $this->request); + $this->container->set('language', $this->language); + $this->container->compile(); $phpbb_container = $this->container; -- cgit v1.2.1