From dc12084d933dc4981a6ff489622845053d4914b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 13 Apr 2016 14:46:31 +0200 Subject: [PATCH] Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live --- src/Wallabag/ImportBundle/Import/PocketImport.php | 1 + src/Wallabag/ImportBundle/Import/WallabagImport.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index f598e6112..ac68b6d92 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -258,6 +258,7 @@ class PocketImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; } diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php index d65bc5306..b265f9f10 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagImport.php +++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php @@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; }