Go to file
John Goerzen 3305d8cd4d Daniel Jacobowitz patches
fixes deb#433732

Date: Sun, 30 Sep 2007 13:54:56 -0400
From: Daniel Jacobowitz <drow@false.org>
To: offlineimap@complete.org
Subject: Assorted patches

Here's the result of a lazy Sunday hacking on offlineimap.  Sorry for
not breaking this into multiple patches.  They're mostly logically
independent so just ask if that would make a difference.
First, a new -q (quick) option.  The quick option means to only update
folders that seem to have had significant changes.  For Maildir, any
change to any message UID or flags is significant, because checking
the flags doesn't add a significant cost.  For IMAP, only a change to
the total number of messages or a change in the UID of the most recent
message is significant.  This should catch everything except for
flags changes.

The difference in bandwidth is astonishing: a quick sync takes 80K
instead of 5.3MB, and 28 seconds instead of 90.

There's a configuration variable that lets you say every tenth sync
should update flags, but let all the intervening ones be lighter.


Second, a fix to the UID validity problems many people have been
reporting with Courier.  As discussed in Debian bug #433732, I changed
the UID validity check to use SELECT unless the server complains that
the folder is read-only.  This avoids the Courier bug (see the Debian
log for more details).  This won't fix existing validity errors, you
need to remove the local status and validity files by hand and resync.


Third, some speedups in Maildir checking.  It's still pretty slow
due to a combination of poor performance in os.listdir (never reads
more than 4K of directory entries at a time) and some semaphore that
leads to lots of futex wake operations, but at least this saves
20% or so of the CPU time running offlineimap on a single folder:

Time with quick refresh and md5 in loop: 4.75s user 0.46s system 12%
cpu 41.751 total
Time with quick refresh and md5 out of loop: 4.38s user 0.50s system
14% cpu 34.799 total
Time using string compare to check folder: 4.11s user 0.47s system 13%
cpu 34.788 total


And fourth, some display fixes for Curses.Blinkenlights.  I made
warnings more visible, made the new quick sync message cyan, and
made all not explicitly colored messages grey.  That last one was
really bugging me.  Any time OfflineIMAP printed a warning in
this UI, it had even odds of coming out black on black!


Anyway, I hope these are useful.  I'm happy to revise them if you see
a problem.

-- 
Daniel Jacobowitz
CodeSourcery
2007-10-01 22:20:37 +01:00
bin Update version 2007-08-01 02:29:06 +01:00
debian Update changelog 2007-08-01 02:28:36 +01:00
docs/sgml-common Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
offlineimap Daniel Jacobowitz patches 2007-10-01 22:20:37 +01:00
COPYING Update FSF address 2006-08-12 05:15:55 +01:00
COPYRIGHT Updated copyright files 2007-07-04 18:54:41 +01:00
FAQ.html Add the FAQ 2006-12-02 22:03:05 +01:00
Makefile doc target no longer depends on faq 2007-03-27 08:20:44 +01:00
offlineimap.conf Daniel Jacobowitz patches 2007-10-01 22:20:37 +01:00
offlineimap.conf.minimal Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
offlineimap.py Update version 2007-08-01 02:29:06 +01:00
offlineimap.sgml Daniel Jacobowitz patches 2007-10-01 22:20:37 +01:00
offlineimap.spec Updating version number to 4.0.16 2006-12-02 21:59:02 +01:00
README Updated copyright and version info for 4.0.15 2006-11-30 10:51:14 +01:00
setup.py Updated copyright and version info for 4.0.15 2006-11-30 10:51:14 +01:00
UPGRADING Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00

OfflineIMAP
Copyright (C) 2002 - 2006 John Goerzen <jgoerzen@complete.org>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details.  This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.

http://software.complete.org/offlineimap/

Please see manual.txt; the information previously in README has been moved
there.