docker-offlineimap/offlineimap
Sebastian Spaeth 6dc74c9da5 Improve delete performance with SQLITE backend
When deleting many (eg 2000) mails using the SQLITE backend, this takes
a long time durig which OfflineImap can not be aborted via
CTRL-C. Thinking it had frozen permanently, I killed it hard, leaving a
corrupted db journal (which leads to awkwards complaints by OLI on
subsequent starts!). That shows that delete performance is critical and
needs improvement.

We were iterating through the list of messages to delete and deleted
them one-by-one execute()'ing a new SQL Query for each message. This
patch improves the situation by allowing us to use executemany(), which
is -despite still being one SQL query per message- much faster. This is
because rather than performing a commit() after each mail, we now do
only one commit() after all mails have been deleted.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-01-17 04:17:15 +01:00
..
folder Improve delete performance with SQLITE backend 2012-01-17 04:17:15 +01:00
repository Don't fail if /etc/netrc is not readable 2012-01-09 16:39:12 +01:00
ui Don't emit regular sleeping announcements in Basic UI 2012-01-10 07:20:49 +01:00
__init__.py Release v6.5.2 2012-01-17 01:40:12 +01:00
accounts.py mbnames should write out local and not nametransformed box names 2012-01-08 12:48:21 +01:00
CustomConfig.py Remove deprecated calls to apply() 2011-09-27 13:00:12 +02:00
error.py Introduce new error level FOLDER_RETRY 2011-09-06 19:00:21 +02:00
imaplib2.py Bump bundled imaplib2 to 2.29 2011-11-02 10:55:42 +01:00
imaplibutil.py Allow to pass 'force' arg to selectro() to enforce a new select 2012-01-08 11:29:54 +01:00
imapserver.py Remove from __future__ import with_statements 2012-01-06 23:13:55 +01:00
imaputil.py Do not fail calling dequote() with empty string 2011-09-26 15:16:59 +02:00
init.py Disable old global lock system 2012-01-06 23:54:28 +01:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py explicitly define symbols to import instead of 'import *' 2011-05-09 22:43:03 +02:00
syncmaster.py Exit "infinite" monitorloop when SyncRunner thread exits 2011-11-02 11:55:05 +01:00
threadutil.py Exit "infinite" monitorloop when SyncRunner thread exits 2011-11-02 11:55:05 +01:00