Skip to content

Commit ff56eb2

Browse files
minor symfony#17104 [Routing] Reduce memory usage of a high consuming test case (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [Routing] Reduce memory usage of a high consuming test case | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Tests fail transiently on hhvm because of the high memory usage of this test case. This patch cuts it by two. See this blackfire comparison graph on the Memory dimension: https://blackfire.io/profiles/compare/fd72ee66-e4d0-4ac2-92bf-16dd3849ef4c/graph?settings%5Bdimension%5D=pmu Commits ------- 478a031 [Routing] Reduce memory usage of a high consuming test case
2 parents bbc53dd + 478a031 commit ff56eb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ public function testDumpWithTooManyRoutes()
9191
}
9292
$this->routeCollection->add('Test2', new Route('/testing2'));
9393

94-
$data = $this->generatorDumper->dump(array(
94+
file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array(
9595
'class' => 'ProjectLargeUrlGenerator',
96-
));
97-
file_put_contents($this->largeTestTmpFilepath, $data);
96+
)));
97+
$this->routeCollection = $this->generatorDumper = null;
9898
include $this->largeTestTmpFilepath;
9999

100100
$projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php'));

0 commit comments

Comments
 (0)