Closed Bug 466891 Opened 16 years ago Closed 16 years ago

fetching imap flags twice

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.9.1b1

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Details

(Keywords: perf, regression)

Attachments

(1 file)

While looking at protocol logs, I've noticed us fetching 1:* flags twice for some folders. This is very bad for large folders. I'll try to figure out what's going on.
Flags: blocking-thunderbird3+
Attached patch proposed fixSplinter Review
If we're fetching all the flags without a CHANGEDSINCE clause, we need to mark the flag state as full, not partial. Then, we won't fall into this code:

        // if we did a CHANGEDSINCE fetch, do a sanity check on the msg counts
        // to see if some other client may have done an expunge.
        if (m_flagState->GetPartialUIDFetch())

and we'll avoid the double fetch.
Attachment #350212 - Flags: superreview?(bugzilla)
Attachment #350212 - Flags: review?(bugzilla)
I'd like this for b1 - it's a regression and slows down loading large imap folders.
Keywords: regression
Comment on attachment 350212 [details] [diff] [review]
proposed fix

>       if (!needFullFolderSync && !GetShowDeletedMessages() && UseCondStore())
>         PR_snprintf(fetchModifier, sizeof(fetchModifier), " (CHANGEDSINCE %llu)",
>                     mFolderLastModSeq);
>+      else
>+        m_flagState->SetPartialUIDFetch(PR_FALSE);
>+
> 
>       FetchMessage(idsToFetch, kFlags, fetchModifier);

nit: I don't think we need the extra blank line adding.
Attachment #350212 - Flags: superreview?(bugzilla)
Attachment #350212 - Flags: superreview+
Attachment #350212 - Flags: review?(bugzilla)
Attachment #350212 - Flags: review+
fixed for tb 3.0 b1
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Status: RESOLVED → VERIFIED
Keywords: perf
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: