On Thursday Aug 27 2020, Christophe de Dinechin wrote:
> Hello,
>
>
> I use four machines sync'd with the same accounts, 12 accounts, 133
> mailboxes, roughly 580k messages. Two of the machines run Linux (a
> desktop and a laptop), two run macOS Catalina (a 16' new MacBook pro,
> a 15' 2017 MacBook pro).
>
> I observed the same slowdowns on occasions on all configurations, so
> this is definitely not a mac-only thing. Every time, an update process
> was ongoing, which I could see by switching to hidden buffer "
> *mu4e-updates" (notice the leading space).
>
> Sometimes, this would be a temporary slow-down during mail download (slow DSL), but in most cases. it was mu4e indexing. I ended up setting mu4e-index-lazy-check to t, and it helped quite a bit. I still occasionally have to wait for a message, but much less often than before.
>
> mu4e-update-interval 421 ;; Roughly 7 minutes
> mu4e-headers-skip-duplicates t ;; Don't record duplicates
> mu4e-index-cleanup nil ;; Don't do a full cleanup check
> mu4e-index-lazy-check t) ;; Don't consider up-to-date dirs
>
> Downside: I now have to occasionally run mu index manually to get some cleanup done (usually some message not showing up where it should be).
>
> Back to the symptoms: a full indexing takes ~250s, so clearly, if you
> index for 250s and refresh every 420s, there is a good chance you will
> be indexing ;-) The next step for me is to more clearly separate
> "archive" and "non-archive" boxes, and mark the archive mailboxes as
> "noindex".
To add to that, you really only need a 'full index' when setting up mu4e
(or upgrading to a version with a different database layout) -- so very
rarely.
For the 'normal' case, `mu index` should be very fast; in my case (88K
messages) it takes less than a second if there are no new messages, and
if there are some new messages, it doesn't take much longer; mu should
be able to index 100s of message per second -- and I guess most people
don't get 100s of messages each few minutes.
Getting those messages (with mbsync, offlineimap, ...) would take much
longer than that. But retrieval doesn't block mu4e.
Now, if `mu index` runs much slower than that, we should investigate!
First thing would be to check if `mu index' is slow or if this only
happens with mu4e.
> PS: I'm curious: what is the command-line option for mu-index to do a
> lazy indexing, if any.
`mu help index` is your friend --> '--lazy-check'