made a performance optimization

To benefit from the optimization, you need to change this line from your
autoload.php:

require_once $vendorDir.'/symfony/src/Symfony/Component/HttpFoundation/UniversalClassLoader.php';

to this one:

require_once $vendorDir.'/symfony/src/Symfony/Component/HttpKernel/bootstrap.php';

Notice that if you don't do this change, your app will in fact be slower than before.
This commit is contained in:
Fabien Potencier 2011-01-25 09:06:12 +01:00
parent 3e71c2c76e
commit 79dce161dd
3 changed files with 1649 additions and 242 deletions

View File

@ -120,8 +120,6 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
return;
}
require_once __DIR__.'/bootstrap.php';
// init bundles
$this->initializeBundles();

View File

@ -23,15 +23,26 @@ if (file_exists(__DIR__.'/../../bootstrap.php')) {
}
ClassCollectionLoader::load(array(
'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface',
'Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler',
'Symfony\\Component\\HttpKernel\\ClassCollectionLoader',
'Symfony\\Component\\DependencyInjection\\ContainerInterface',
'Symfony\\Component\\DependencyInjection\\Container',
'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface',
'Symfony\\Component\\DependencyInjection\\ContainerInterface',
'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag',
'Symfony\\Component\\DependencyInjection\\ContainerAware',
'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface',
'Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag',
'Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag',
'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface',
'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
'Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler',
'Symfony\\Component\\HttpKernel\\ClassCollectionLoader',
'Symfony\\Component\\HttpKernel\\HttpKernelInterface',
'Symfony\\Component\\HttpKernel\\Kernel',
'Symfony\\Component\\HttpFoundation\\ParameterBag',
'Symfony\\Component\\HttpFoundation\\FileBag',
'Symfony\\Component\\HttpFoundation\\ServerBag',
'Symfony\\Component\\HttpFoundation\\HeaderBag',
'Symfony\\Component\\HttpFoundation\\Request',
'Symfony\\Component\\HttpFoundation\\UniversalClassLoader',
), __DIR__.'/../..', 'bootstrap', false);

File diff suppressed because it is too large Load Diff