emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exchange 2007 Issues When Copying Between Folders


From: Simon Josefsson
Subject: Re: Exchange 2007 Issues When Copying Between Folders
Date: Wed, 02 Apr 2008 00:08:26 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Gaute Strokkenes <address@hidden> writes:

> On  1 april 2008, address@hidden 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 via email to

[Prev in Thread] Current Thread [Next in Thread]