Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/IMAP
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-06-15 18:55:12 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-06-15 19:28:40 +0300
commit8d207e91217b0f397572ad46ee7bc71a4105c988 (patch)
tree73e072e9f1d98a319ab7a020a41fc27424654709 /lib/IMAP
parentcf8875479228e08ec4edb04a26ef3f271f077fd2 (diff)
Lower the chunk size for IMAP syncs
In #3110 I lowered the chances of too long IMAP commands by splitting the sync process. As we've seen in production it's still possible that certain accounts run into the issue that their chunked UID list is producing an IMAP command that is too long. So I'm once again lower the chances by lowering the chunk size. This could have a tiny effect on sync performance as it now takes more chunks to check for the changed/vanished messages of one account. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/IMAP')
-rw-r--r--lib/IMAP/Sync/Synchronizer.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/IMAP/Sync/Synchronizer.php b/lib/IMAP/Sync/Synchronizer.php
index 962a9af5e..bf124921c 100644
--- a/lib/IMAP/Sync/Synchronizer.php
+++ b/lib/IMAP/Sync/Synchronizer.php
@@ -36,7 +36,15 @@ use function array_chunk;
use function array_merge;
class Synchronizer {
- private const UID_CHUNK_SIZE = 15000;
+
+ /**
+ * This determines how many UIDs we send to IMAP for a check of changed or
+ * vanished messages. The number needs a balance between good performance
+ * (few chunks) and staying below the IMAP command size limits. 15k has
+ * shown to cause IMAP errors for some accounts where the UID list can't be
+ * compressed much by Horde.
+ */
+ private const UID_CHUNK_SIZE = 10000;
/** @var MessageMapper */
private $messageMapper;