From 62deed1379338ef8fc8133b9606e8f0e534a257e Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Thu, 27 Oct 2022 15:35:39 -0500 Subject: maildir: set SkipSort when checking mail The maildir worker's check-mail command did not include the SkipSort directive in the DirectoryInfo, which would cause a fresh fetching of directory contents on the selected maiboxes. This is unneeded and resulted in every directory being sent to the msgstore and requesting a sort. Set SkipSort when checking mail to prevent extra calls to sort. Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- worker/maildir/worker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go index a9c45ce8..5a4316c4 100644 --- a/worker/maildir/worker.go +++ b/worker/maildir/worker.go @@ -744,7 +744,8 @@ func (w *Worker) handleCheckMail(msg *types.CheckMail) { } dirInfo := w.getDirectoryInfo(name) w.worker.PostMessage(&types.DirectoryInfo{ - Info: dirInfo, + Info: dirInfo, + SkipSort: true, }, nil) } w.done(msg) -- cgit