Merge pull request #7201 from kinglozzer/build-perf

Ensure ClassManifest isn't flushed twice on build
This commit is contained in:
Damian Mooyman 2017-07-25 09:51:00 +12:00 committed by GitHub
commit 2c500c79c3

View File

@ -122,8 +122,12 @@ class DatabaseAdmin extends Controller
// The default time limit of 30 seconds is normally not enough
Environment::increaseTimeLimitTo(600);
// Get all our classes
ClassLoader::inst()->getManifest()->regenerate(false);
// If this code is being run outside of a dev/build or without a ?flush query string param,
// the class manifest hasn't been flushed, so do it here
$request = $this->getRequest();
if (!array_key_exists('flush', $request->getVars()) && strpos($request->getURL(), 'dev/build') !== 0) {
ClassLoader::inst()->getManifest()->regenerate(false);
}
$url = $this->getReturnURL();
if ($url) {