1
0
mirror of synced 2025-02-09 08:49:26 +03:00

Merge pull request #6442 from sensorario/performance-improvement

Compute size of loaders in the test suite beforehand, and not on each iteration
This commit is contained in:
Marco Pivetta 2017-05-16 13:40:17 +02:00 committed by GitHub
commit 334b7e68a7

View File

@ -35,7 +35,8 @@ class SetupTest extends OrmTestCase
set_include_path($this->originalIncludePath);
$loaders = spl_autoload_functions();
for ($i = 0; $i < count($loaders); $i++) {
$numberOfLoaders = count($loaders);
for ($i = 0; $i < $numberOfLoaders; $i++) {
if ($i > $this->originalAutoloaderCount+1) {
spl_autoload_unregister($loaders[$i]);
}