Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ If you're using the Standard Distribution, make the following changes::

use Symfony\Component\ClassLoader\ApcClassLoader;

$loader = require __DIR__.'/../app/autoload.php';
// do not use $loader as a variable name here as it would
// be overwritten when loading the bootstrap.php.cache file
$classLoader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance
// Change 'sf2' by the prefix you want in order
// to prevent key conflict with another application
$loader = new ApcClassLoader('sf2', $loader);
$loader = new ApcClassLoader('sf2', $classLoader);
$loader->register(true);

// ...
Expand Down