Gnus development mailing list
 help / color / mirror / Atom feed
* Slow nnimap expiry with expiry-target
@ 2003-09-23 12:34 Bjørn Mork
  2003-09-23 14:59 ` Simon Josefsson
  0 siblings, 1 reply; 17+ messages in thread
From: Bjørn Mork @ 2003-09-23 12:34 UTC (permalink / raw)


I'm using total-expire to archive old messages from some of my nnimap
folders, using another nnimap folder as expiry-target.  This is
incredibly slow, often using several minutes to move just a few small
messages from one folder to another on the same imap server.

Turning on imap-log gave me an idea of why.  Expiring 19 messages
resulted in a 5 MB imap-log!  Shouldn't this be just one search, one
copy, one flag update and one expunge?  How come it adds up to a 5 MB
log?  

Well, what Gnus does:

Searching for messages to expire:
1397 UID SEARCH UID ... NOT SINCE 29-Aug-2003

Processing first message:
1398 UID FETCH 33156 BODY.PEEK[]
1399 SELECT "INBOX.lest"
1400 UID SEARCH UNSEEN UNDELETED
1401 UID SEARCH SEEN
1402 UID SEARCH FLAGGED
1403 UID SEARCH ANSWERED
1404 UID SEARCH RECENT
1405 FETCH 1,* UID
1406 SELECT "INBOX"
1407 UID COPY 33156 "INBOX.lest"
1408 EXAMINE "INBOX.lest"
1409 UID FETCH * UID
1410 SELECT "INBOX"
1411 SELECT "INBOX.lest"
1412 UID SEARCH UNSEEN UNDELETED
1413 UID SEARCH SEEN
1414 UID SEARCH FLAGGED
1415 UID SEARCH ANSWERED
1416 UID SEARCH RECENT
1417 FETCH 1,* UID
1418 UID STORE 1:5175 +FLAGS (\Seen)

Processing second message:
1419 SELECT "INBOX"
1420 UID FETCH 33158 BODY.PEEK[]
1421 SELECT "INBOX.lest"
1422 UID SEARCH UNSEEN UNDELETED
1423 UID SEARCH SEEN
etc like above for all 19 messages.

Deleting:
1815 SELECT "INBOX"
1816 UID STORE 33156,33158,33170,33173,33183,33188,33193,33198,33222,33237:33238,33244,33248,33367,33382,33385:33387,33399 +FLAGS (\Deleted)
1817 STATUS "INBOX" (unseen)
1818 EXPUNGE


The problems I can spot are

1) fetching the messages from the server.  I can't see any reason for
   this.  We have the list of UIDs to move.  We are using imap copy on
   the server.  There is no need to download the messages.  This is
   of course extra annoying when reading mail on a slow link and some
   message with a large attachment suddenly is up for expiration...
2) repeatedly fetching all flags for all messages in the folder we are
   moving to.  If there is any point in this at all, there certainly
   can't be any point in repeating it 38 times to move 19 messages?
   Some of the returned lists of UIDs are very long (#\Seen is
   typically identical to #messages in the folder, #\Answered is also
   often a long list).  Flags are cached by Gnus, are they not?
   Anyway,
3) "UID STORE ... +FLAGS (\Seen)" results in as many lines of response
   from the imap server as there are messages in the folder.  And
   it seems totally unecessary.  According to RFC 2060 flags SHOULD be
   preserved in the copy.  And why repeat this for every moved message
   even if it should prove necessary?

I am sure there are reasons I can't see for some or all of these, but
there must be *something* that can be done to speed up nnimap expiry.
It's annoyingly slow as it is now.


Bjørn
-- 
It takes a white slimebag like you to say that a homosexual man ain't
got nothing in the world these days.



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-10-10  3:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-23 12:34 Slow nnimap expiry with expiry-target Bjørn Mork
2003-09-23 14:59 ` Simon Josefsson
2003-09-23 17:37   ` Zack Weinberg
2003-09-23 18:11     ` Simon Josefsson
2003-09-23 19:41       ` Zack Weinberg
2003-09-23 19:56         ` Simon Josefsson
2003-09-23 19:59           ` Simon Josefsson
2003-09-23 20:41             ` Jochen Küpper
2003-09-23 20:56               ` Simon Josefsson
2003-09-24 10:42               ` Ted Zlatanov
2003-09-25 14:40                 ` Reiner Steib
2003-09-25 17:54                   ` Simon Josefsson
2003-09-26  2:57                     ` Jesper Harder
2003-10-04 22:10           ` Adding "move" operation to Gnus backends (Was: Slow nnimap...) Steinar Bang
2003-10-10  3:05             ` Adding "move" operation to Gnus backends Jesper Harder
2003-10-06 12:11   ` Slow nnimap expiry with expiry-target Bjørn Mork
2003-10-06 17:58     ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).