From 2fcbaee0b65dd66d07deff5feb015954d8bca8ee Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 19 May 2022 11:53:06 +0200 Subject: [PATCH] Revert "push debug logs" This reverts commit 4cbf3b1e12079fec4c4a723234ceb63e8dec0f28. --- src/Appwrite/Migration/Migration.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 14e931c316..844923993f 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -16,7 +16,7 @@ abstract class Migration /** * @var int */ - protected int $limit = 250; + protected int $limit = 100; /** * @var Document @@ -108,9 +108,7 @@ abstract class Migration Console::log('Migrating Collection ' . $collection['$id'] . ':'); do { - $start = microtime(true); $documents = $this->projectDB->find($collection['$id'], limit: $this->limit, cursor: $nextDocument); - var_dump("Fetching documents took " . microtime(true) - $start); $count = count($documents); $sum += $count; @@ -123,17 +121,10 @@ abstract class Migration return; } - $start = microtime(true); - $old = $document->getArrayCopy(); $new = call_user_func($callback, $document); - var_dump("migration took " . microtime(true) - $start); - $start = microtime(true); - $diff = !$this->hasDifference($new->getArrayCopy(), $old); - var_dump("Diff took " . microtime(true) - $start); - - if (!$diff) { + if (!$this->hasDifference($new->getArrayCopy(), $old)) { return; }