Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <simon@josefsson.org>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: Jake Colman <colman@ppllc.com>,
	ding@gnus.org, Emacs developers <emacs-devel@gnu.org>
Subject: Re: Exchange 2007 Issues When Copying Between Folders
Date: Wed, 02 Apr 2008 00:08:26 +0200	[thread overview]
Message-ID: <87bq4tw7mt.fsf@mocca.josefsson.org> (raw)
In-Reply-To: <87bq4tteuj.fsf@srcf.ucam.org> (Gaute Strokkenes's message of "Tue, 01 Apr 2008 23:00:52 +0100")

Gaute Strokkenes <gs234@srcf.ucam.org> writes:

> On  1 april 2008, simon@josefsson.org wrote:
>
> [snip]
>> However, the recently installed patch for Gnus is definitely the wrong
>> thing:
>>
>> -	  (imap-fetch "1,*" "UID" nil 'nouidfetch)
>> +	  (imap-fetch "1:*" "UID" nil 'nouidfetch)
>>
>> This generates thousands and thousands of unnecessary lines of output,
>> such as:
>>
>> 669 FETCH 1:* UID
>> * 1 FETCH (UID 53159)
>> * 2 FETCH (UID 53160)
>> * 3 FETCH (UID 53161)
>> ...
>> * 103915 FETCH (UID 157074)
>> * 103916 FETCH (UID 157075)
>> * 103917 FETCH (UID 157076)
>> 669 OK Completed
>>
>> That's about 2-3MB of output, and that was getting information for one
>> of my folders (I subscribe to maybe 100-150 folders..).
>>
>> This slows down pressing 'g' on my server from sub-seconds to a very
>> long time (I pressed C-g after half a minute).
>>
>> This is how the output should look like:
>>
>> 698 FETCH 1,* UID
>> * 1 FETCH (UID 53159)
>> * 103918 FETCH (UID 157077)
>> 698 OK Completed
>>
>> That's 89 bytes and takes ms's to transfer.
>
> If I understand correctly, what this command is intended to do is to
> retrieve the UID of the last and first messags in the mailbox.

Yes.

> If so, would it not be possible to use a pair of FETCH commands
> instead?

Perhaps, those with exchange servers could test this.  The patch would
then be.  Jake, does this patch (against latest CVS) also work for you?
If it works, it should definitely be faster than 1:* queries.

--- nnimap.el	01 Apr 2008 16:27:27 +0200	7.45
+++ nnimap.el	02 Apr 2008 00:07:39 +0200	
@@ -568,8 +568,10 @@
 	      (imap-mailbox-select group examine))
       (let (minuid maxuid)
 	(when (> (imap-mailbox-get 'exists) 0)
-	  (imap-fetch (if nnimap-enable-minmax-bug-workaround "1:*" "1,*")
-		      "UID" nil 'nouidfetch)
+	  (if (not nnimap-enable-minmax-bug-workaround)
+	      (imap-fetch "1,*" "UID" nil 'nouidfetch)
+	    (imap-fetch "1" "UID" nil 'nouidfetch)
+	    (imap-fetch "*" "UID" nil 'nouidfetch))
 	  (imap-message-map (lambda (uid Uid)
 			      (setq minuid (if minuid (min minuid uid) uid)
 				    maxuid (if maxuid (max maxuid uid) uid)))

/Simon



  reply	other threads:[~2008-04-01 22:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 14:54 Jake Colman
2008-03-31 18:50 ` Ted Zlatanov
2008-04-01 14:06   ` Simon Josefsson
2008-04-01 14:13     ` Jake Colman
2008-04-01 14:14     ` Jake Colman
2008-04-01 14:21       ` Simon Josefsson
2008-04-01 14:29         ` Simon Josefsson
2008-04-01 14:34           ` Jake Colman
2008-04-01 14:49             ` Simon Josefsson
2008-04-02 14:22               ` Ted Zlatanov
2008-04-02 14:35                 ` Simon Josefsson
2008-04-01 22:00     ` Gaute Strokkenes
2008-04-01 22:08       ` Simon Josefsson [this message]
2008-04-02 14:19     ` Ted Zlatanov
2008-04-02 14:33       ` Simon Josefsson
2008-04-03 13:09         ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bq4tw7mt.fsf@mocca.josefsson.org \
    --to=simon@josefsson.org \
    --cc=colman@ppllc.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).