Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: Re: nnimap issues
Date: Mon, 27 Sep 2010 19:20:39 +0200	[thread overview]
Message-ID: <m3r5gfqf14.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <87y6anw8rq.fsf@mocca.josefsson.org>

Simon Josefsson <simon@josefsson.org> writes:

> Then I wonder if it is the EXAMINE or the UID FETCH that is taken time,
> compared to the old approach of using STATUS.

On some servers the EXAMINE itself is slow, while on others it's fast.

> As I recall, this isn't specific to nnimap, and happens for all backends
> if there are holes in the article range.

Yes.  IMAP is unique, though, in that some servers have very sparse
article numbers, and that people read/delete messages from different
user agents routinely, and expect this to be reflected in all the user
agents... 

> But does it have to EXAMINE+FETCH all groups unconditionally?  I think
> it does that, right?  It could use the old approach with STATUS to
> quickly see what mailboxes have changed at all, and then for those
> (hopefully few) mailboxes that have changed, do the EXAMINE+FETCH dance.

But the problem is that STATUS will only say whether you've gotten a new
message, not whether you've read/deleted some of the messages via a
different user agent...

> Ah.  I think I got it: the old code sent the STATUS in parallel, like this:
>
> 1554 STATUS "INBOX.sent-2010" (UIDVALIDITY UIDNEXT UNSEEN)
> 1555 STATUS "INBOX.sent-2009" (UIDVALIDITY UIDNEXT UNSEEN)
> 1556 STATUS "INBOX.fossgrupp" (UIDVALIDITY UIDNEXT UNSEEN)
> 1557 STATUS "INBOX.apel-en" (UIDVALIDITY UIDNEXT UNSEEN)
>
> and then waits for all the replies.  The new code iterates through all
> groups and does EXAMINE+FETCH on each of them.
>
> What is biting now may be all the round trips.

No, they're still being streamed, like the old code.  nnimap now issues
a bunch of EXAMINE+FETCH commands, and then waits for the last response
to trickle in.  (Well, it usually doesn't wait, because this is now
issued early in the `g' cycle, so if you have other servers (like NNTP
or whatever), it'll issue the nnimap stuff first, then wait for the NNTP
stuff, and then look whether the IMAP stuff has arrived...)

However, it would make sense to allow the user to twiddle this.  If the
user only reads the IMAP groups from a single Gnus instance, then STATUS
would be fine.  Is that very common, though?

> 1) Parallel STATUS like the old code to discover which groups have been
> changed at all.
>
> 2) For those groups that have changed, do the EXAMINE+FETCH dance.

That would be possible, but then it'd have to wait for the STATUS
responses to arrive before doing any EXAMINE+FETCH stuff, which doubles
the round trips...

> That idiom brings back memories.  Glad to have you back working on Gnus,
> Lars!

It's fun to be back.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




  reply	other threads:[~2010-09-27 17:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 10:55 Simon Josefsson
2010-09-26 16:17 ` Lars Magne Ingebrigtsen
2010-09-26 17:08   ` Lars Magne Ingebrigtsen
2010-09-26 18:33     ` Steinar Bang
2010-09-26 18:40       ` Lars Magne Ingebrigtsen
2010-09-26 23:44         ` Daniel Pittman
2010-09-26 17:49   ` Lars Magne Ingebrigtsen
2010-09-27 14:26     ` Simon Josefsson
2010-09-27 16:56       ` Lars Magne Ingebrigtsen
2010-09-27 14:39   ` Simon Josefsson
2010-09-27 17:20     ` Lars Magne Ingebrigtsen [this message]
2010-09-27 17:25       ` Steinar Bang
2010-09-27 17:39         ` Julien Danjou
2010-09-27 21:17           ` Frank Schmitt
2010-09-28  8:08 ` Steinar Bang
2010-09-28  8:35   ` David Engster
2010-09-28 13:00     ` Steinar Bang
2010-09-29 15:06       ` Lars Magne Ingebrigtsen
2010-10-12  6:45       ` Steinar Bang
2010-10-12 12:44         ` Lars Magne Ingebrigtsen

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=m3r5gfqf14.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=ding@gnus.org \
    /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).