You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we could figure out a big performance issue related to not calling em->clear() correctly.
this issue occurs only if you init a new DoctrineWriter with a namespace alias like CompanyAppBundle:User instead of Company\AppBundle\Entity\User
Due to this issue $this->entityManager->clear($this->entityName) gets called with a "wrong" entity name so the entity wont get cleared in the entityManager which results in an exponential performance and memory issues the more items we try to import.
The maybe easiest fix:
Changing the constructor of the DoctrineWriter to translate the $entityName to the same
public function __construct(EntityManager $entityManager, $entityName, $index = null)
{
//translate entityName in case a namespace alias is used
$entityName = $entityManager
->getMetadataFactory()
->getMetadataFor($entityName)
->getName();
$this->entityManager = $entityManager;
$this->entityName = $entityName;
best
Justus
The text was updated successfully, but these errors were encountered:
Hi,
we could figure out a big performance issue related to not calling em->clear() correctly.
this issue occurs only if you init a new
DoctrineWriter
with a namespace alias likeCompanyAppBundle:User
instead ofCompany\AppBundle\Entity\User
Due to this issue
$this->entityManager->clear($this->entityName)
gets called with a "wrong" entity name so the entity wont get cleared in the entityManager which results in an exponential performance and memory issues the more items we try to import.The maybe easiest fix:
Changing the constructor of the DoctrineWriter to translate the
$entityName
to the samebest
Justus
The text was updated successfully, but these errors were encountered: