On Tue, Mar 11, 2003 at 03:58:55PM +0000, David Woodhouse wrote:
> But I'm still the wrong end of a 64K ISDN line and even now, with
> negligible time actually taken by the _server_ the round-trip time for
> 40-odd STATUS commands is enough to annoy me.

That could be fixed by sending all the STATUS queries to server at once.

> > But I'm still not sure if it's worth it. Client doesn't _have_ to update
> > flags for all messages. You probably only care about the unseen count which
> > you can get with STATUS, and the flags for visible messages. Fetching flags
> > for only the 20 messages or so isn't slow at all. That would require some
> > changes to client, but probably not that much.

Actually this brings to my mind: STATUS for selected folder isn't considered
good behaviour. Fetching flags for all messages in folder isn't considered
good behaviour. So, how exactly do I keep unseen messages count up to date
for selected mailbox?

I wouldn't be against flags-validity, but I'm not sure if it's worth the
trouble. The kind of validity-request uidset-response would allow servers to
be pretty flexible in how they handle it. I think it should work something
like this:

Client remembers the last flags-validity given by server and requests that
the next time it selects the mailbox. Server updates the validity when one
of the clients closes the mailbox and there has been at least one flag
update. It sends to all clients (including the one that is closing the
mailbox/connection):

* OK [FLAGS-VALIDITY <newvalidity>]

Updating flags-validity isn't necessarily a fast operation, so that way it
doesn't have to be updated all the time.

Some ways for server to handle this:

- Keep flags-validity value of last flag change for each message. Takes
  pretty much disk space and may be slow.
- Keep only the last flags-validity value. That helps only when there hasn't
  been any flag changes since client last accessed the mailbox
- Keep low-validity and low-uid. if client request any flags-validity >=
  low-validity, only return low-uid:* instead of 1:*
- Keep a log of the last few flags-validities and what messages they changed

Reply via email to