Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: Re: fast list
Date: Mon, 18 Oct 2010 23:03:16 +0200	[thread overview]
Message-ID: <m3r5fn8b8r.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <m3mxqbi5ui.fsf@carbon.jhcloos.org>

James Cloos <cloos@jhcloos.com> writes:

> I restart gnus again last night, with strace attached.  It sent:
>
>   LIST                           # *fast*, now
>   EXAMINE for each group         # took ~20 min
>   # worked internally for ~20 min
>   LIST                           # again?
>   EXAMINE/UID FETCH FLAGS tuple  # another ~20 min

That's odd.  There should only be one EXAMINE run.  And that's what I
get if I push `g'.

>>> LIST "" "%" RETURN (STATUS (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN))
>
> It seems like an extended LIST which returns STATUS and FLAGS would do
> the same as the UID FETCH FLAGS for every group, yes?
>
> At the very least LIST-STATUS should avoid the need to EXAMINE each
> group twice, yes?

Well, if you issue FETCH FLAGS, then you have to issue EXAMINE, too.

> If I get an i-d written up to support a FLAGS return type for LIST,
> would you be willing to add support for that to nnimap?

Returning the FLAGS for all the groups will be so much data that's it's
not generally useful.  However, a global QRESYNC would be excellent.
QRESYNC works by outputting all the flags that have changed since
<SEQUENCE>.  So if you said

LIST "" "%" RETURN (STATUS QRESYNC 43488328)

(or something) to return all the changed flags since that sequence
number, that would allow a really fast and comprehensive server->client
flag sync-up.

Have a look at RFC5162 for the QRESYNC description, but there it's only
a parameter to EXAMINE/SELECT, so you still need to EXAMINE all the mail
boxes, annoyingly enough.

But here's a thought: nnimap could have a "sloppy" mode.  In the sloppy
mode, it doesn't care about syncing flags that comprehensively, and
instead deferring that to when you enter the group.  The sloppy mode
could work with the LIST RETURN command, for instance, or an EXAMINE run
(with no FETCH FLAGS).  It would just look at UNSEEN and UIDNEXT, and
just say "if UNSEEN is 5, and UIDNEXT is 242, then we say that all
messages between 1-236 are read, and the last five are unread".  When
the group is entered, it issues a "FETCH FLAGS" and gets things right.

But this could be result in pretty brittle behaviour if everything isn't
done just right...

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




  reply	other threads:[~2010-10-18 21:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17  5:15 James Cloos
2010-10-17 22:02 ` Lars Magne Ingebrigtsen
2010-10-17 22:58   ` James Cloos
2010-10-18 19:10     ` Lars Magne Ingebrigtsen
2010-10-18 20:49       ` James Cloos
2010-10-18 21:03         ` Lars Magne Ingebrigtsen [this message]
2010-10-18 23:17           ` James Cloos
2010-10-18 23:38             ` Lars Magne Ingebrigtsen
2010-10-19 16:00               ` James Cloos
2010-10-19 16:13                 ` Steinar Bang
2010-10-19 18:12                   ` Lars Magne Ingebrigtsen
2010-10-19 20:56                   ` James Cloos
2010-10-19 18:12                 ` Lars Magne Ingebrigtsen
2010-10-19 21:05                   ` James Cloos
2010-10-20  0:07                     ` Lars Magne Ingebrigtsen
2010-10-20 18:47                       ` James Cloos
2010-10-21 15:59                         ` Lars Magne Ingebrigtsen
2010-10-21 19:13                           ` James Cloos
2010-10-22 14:51                             ` Lars Magne Ingebrigtsen
2010-10-19  5:58           ` Steinar Bang
2010-10-19 18:11             ` 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=m3r5fn8b8r.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).