docker-offlineimap/offlineimap/folder
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
..
__init__.py Add Gmail IMAP special support. 2008-01-03 04:56:55 +01:00
Base.py Forgot to change a variable name in all cases 2012-01-06 21:41:04 +01:00
Gmail.py Remove visiblename as parameter to IMAPFolder creation 2011-09-16 12:54:29 +02:00
IMAP.py Revert "use .response() rather _get_untagged_response()" 2012-01-09 09:51:43 +01:00
LocalStatus.py WIP, revamp how we treat top-level dirs 2012-01-06 19:08:48 +01:00
LocalStatusSQLite.py Improve delete performance with SQLITE backend 2012-01-17 04:17:15 +01:00
Maildir.py Ignore lower-case custom Maildir flags 2012-01-07 22:00:45 +01:00
UIDMaps.py Improve error message 2012-01-09 09:57:36 +01:00