Skip to content

Commit

Permalink
fix(performance): wrapped entity managers are eager by default, the s…
Browse files Browse the repository at this point in the history
…ervice pool proxy is the lazy layer
  • Loading branch information
Rastusik committed Feb 6, 2023
1 parent 6497fdb commit 7ccbebe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Bridge/Doctrine/DoctrineProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function process(ContainerBuilder $container, Proxifier $proxifier): void

foreach ($entityManagers as $emName => $emSvcId) {
$emDef = $container->findDefinition($emSvcId);
$emDef->setLazy(false); // no need for another level of proxy wihich is technically lazy itself
$tagParams = ['resetter' => EntityManagerResetter::class];
$limit = $this->getLimitFromEntityManagerConnection($container, $emDef);

Expand Down

0 comments on commit 7ccbebe

Please sign in to comment.