mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01: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:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user