According to: news://news.mozilla.org/38769A5B.EF9829E%40netscape.com "After the SELECT, I see: <0.016<9 UID fetch 1:* (FLAGS) followed by a bunch of caption fetches, in chunks: <0.109<10 UID fetch 22267,22269:22271,22273:22275,22277:22279 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Subject Date Priority X-Priority Message-ID References Newsgroups)]) In the second UID FETCH, the "FLAGS" fetch item is redundant--the client already knows all the flags from the first fetch. It shouldn't ask for the flags twice. I presume the reason the first UID FETCH is separate from the rest is to get the msgno-to-UID mappings. One suggestion is to replace the first UID FETCH with a "UID SEARCH UID 1:*". That is much more compact in protocol, and the omitted flags may be retrieved by the caption fetches. The UID sets that it sends in the chunked header fetches are much longer than they need to be. It could have used a UID set of "22267:222593" instead of the 7-line monstrosity it currently sends. The client knows that UIDs 22268,22272, etc. are not in the mailbox, it should not worry about including them in UID sets. Even better, the second UID FETCH shouldn't been a UID FETCH at all. It could have done a "FETCH 1:200", completely removing the need for the first UID FETCH."
Target Milestone: --- → Future
taking. It's a little more complicated than this, but I've been re-working the way we build up the folder list, when we fetch flags, etc, and this will be part of that.
Assignee: mscott → bienvenu
QA Contact: stephend → networking.imap
No, not obsolete. Parts of comment 0 are obsolete (e.g., we do coalesce ranges now) or incorrect, but the fetching of the flags is essentially redundant. I'm not sure how hard or worthwhile it would be to fix it. The reason we always fetch all the flags is in case the flags have changed on the server, e.g., by an other client or from a different machine. We only fetch the headers once per message, but we sync the flags every time.
After a connection drops and is re-established, one does need to re-fetch the flags. If the connection is still up, it is not necessary to re-fetch flags, as the server will send you unsolicited notifications whenever any flags you previously fetched in that connection have changed.
Product: Core → MailNews Core
Severity: normal → minor
Priority: P3 → --
Target Milestone: Future → ---
You need to log in before you can comment on or make changes to this bug.