docker-offlineimap/offlineimap
John Goerzen 0841e03a4c [319117] Unroll loop to speed performance on large folders
From: "Nikita V. Youshchenko"
I trued to use offlineimap and found that while being quite fast on
small folders, it takes up to several minutes (of 100% busy CPU and
almost no network traffic) to sync a folder with 2000+ messages.

While looking into the code, I found why this happens.
In folder/Base.py, in method BaseFolder.syncmessagesto_copy(),
dest.getmessagelist() is called inside a loop, while being a loop
invariant. Similar thing happens in BaseFolder.syncmessagesto_delete()
for self.getmessagelist().
This causes quadratic complexity over folder size.

Moving these calls out of loops make large folder sync fast (several
seconds instead of several minutes for folder with 2000 messages on
700MHz P3).
2005-08-23 08:15:09 +01:00
..
folder [319117] Unroll loop to speed performance on large folders 2005-08-23 08:15:09 +01:00
repository Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
ui Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
__init__.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
accounts.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
CustomConfig.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
imaplib.py Removed unnecessary blank lines 2005-05-24 00:10:11 +01:00
imapserver.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
imaputil.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
init.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
localeval.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
mbnames.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
syncmaster.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
threadutil.py Removed dep on profile 2005-02-10 05:37:33 +01:00
version.py Updated copyright and version files for 4.0.10 2005-05-24 00:12:58 +01:00