The Speed of Offlineimap vs. Mbsync

One of the problems faced by those of us who have moved our email operations into Emacs is how to download the emails from the Imap server. There are two popular solutions: offlineimap and mbsync.

Offlineimap is written in Python and has the reputation of being slower than mbsync, which is a C application. Occasionally you see this disputed by someone offering largely anecdotal evidence that there’s no discernible difference. Such claims are invariably met with other anecdotal evidence that mbsync is indeed faster.

Charl Botha, who’s postings on email in Emacs have been excellent, decided to offer some actual scientific evidence so he ran some timing tests. The tests were all run on a single Windows 10 machine so they are by no means a definitive benchmark but they do offer much better information than we had before and probably generalize to the other platforms.

I’ll let you head over to Botha’s site to get the actual results but the TL;DR is that mbsync’s running time for a sync is about 65% that of offlineimap’s normal mode. Offlineimap, however, also has a quick mode that may not detect some message flag changes but that runs at about the same speed—a little faster, actually—as mbsync.

I don’t think any of this matters much. Generally the syncs are happening in the background so you don’t really notice them unless you’re forcing a sync. Even then, the times are not onerous. As for offlineimap’s quick mode, I think life is already uncertain enough without adding additional entropy to solve a problem that has another, better, solution.

I started off using offlineimap but changed to mbsync because I read reports of instability on offlineimap’s part. I never experienced that so it was probably just irrational paranoia. I don’t know if it’s still true—or ever was, for that matter—but I’ve been happy with mbsync and it was difficult enough to get configured that I have no desire to change.

This entry was posted in General and tagged . Bookmark the permalink.