Gnus development mailing list
 help / color / mirror / Atom feed
From: David Engster <deng@randomsample.de>
To: ding@gnus.org
Subject: Re: gnus and imap
Date: Mon, 25 Aug 2008 14:25:20 +0200	[thread overview]
Message-ID: <kztzd9uvrj.fsf@kafka.physik3.gwdg.de> (raw)
In-Reply-To: <m3fxotr03o.fsf@gravicappa.englab.brq.redhat.com> (Vitaly Mayatskikh's message of "Mon, 25 Aug 2008 10:05:15 +0200")

Vitaly Mayatskikh <v.mayatskih@gmail.com> writes:
>> I also further searched through gmane for the problem of wrong article
>> counts, since this topic came up frequently on the ding list. And lo and
>> behold, there's stuff already in Gnus for this, it's just not documented
>> in the manual.
>
> Wrong articles count is only one of problems. Getting old articles in
> nnimap group is close to impossible: I can't just tell "give me last 5
> old articles", because Gnus calculates wrong uids for these
> articles. Instead of it, I have to ask for last 1000 (or 10000, or
> 100000) articles :(

Well, this is a result of the wrong article count. Gnus simply uses

(- (1+ (cdr active)) (car active))

i.e. highest-lowest as the number of articles in a group. Since Zimbra
doesn't generate contiguous UIDs, this number is far too large. When you
tell Gnus to get the latest 5 articles, it simply queries the back end
with the UIDs from 'highest-4' to 'highest' - again assuming contiguous
article numbers. This is why you have to query Gnus with insane numbers
of articles, and of course this is slow, since the back end gets queried
with the fully expanded sequence.

> Also, I don't like any fixup hooks. Usually that means bad design of
> software, and usually they don't fix the problem at all.

At the moment, I see two options to get rid of this problem:

1) Make nnimap always return contiguous article numbers. Currently,
nnimap simply uses the UIDs provided by the IMAP server as article
numbers. We could change nnimap to use its own set of contiguous article
numbers and map those to the UIDs of the IMAP server.

The advantage would be that changes would be more or less confined to
nnimap, but this also implies that other back ends wouldn't profit from
this.

2) Make Gnus correctly deal with non-contiguous article numbers.

Obviously, all back ends would profit from this, but this would mean
(probably large) changes throughout the back end interface. We could use
gnus-request-group-articles to get a list of all article numbers in a
group (if the back end supports it). Gnus could calculate article counts
from this (total as well as unread) and also query the back end with the
correct sequence of article numbers.

Other options?

> I wish Gnus to cache all needed meta data, like other mail clients do. It
> is really not necessary to ask for all seen/unseen uids again and
> again, but rather to search uids since last update. 

Yes, caching would have to be done as well. We could use a new hash
table for this. There's one for the nnimap-fixup function anyway...

-David



  reply	other threads:[~2008-08-25 12:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 16:14 Vitaly Mayatskikh
2008-08-19 20:12 ` Frank Schmitt
2008-08-19 22:24   ` Vitaly Mayatskikh
2008-08-20  6:42     ` Vegard Vesterheim
2008-08-20  7:41       ` Vitaly Mayatskikh
2008-08-20 16:16 ` David Engster
2008-08-21  6:26   ` Vitaly Mayatskikh
2008-08-21 11:27     ` David Engster
2008-08-21 12:57       ` Tibor Simko
2008-08-22  8:44         ` Vitaly Mayatskikh
2008-08-22  8:54           ` David Engster
2008-08-22 15:35           ` Tibor Simko
2008-08-21 15:06       ` Vitaly Mayatskikh
2008-08-21 21:15       ` Frank Schmitt
2008-08-22 12:13       ` Reiner Steib
2008-08-22 12:30         ` Vitaly Mayatskikh
2008-08-22 15:50           ` Ted Zlatanov
2008-08-22 16:10             ` Vitaly Mayatskikh
2008-08-22 16:21         ` David Engster
2008-08-22 16:27           ` Vitaly Mayatskikh
2008-08-22 17:33             ` David Engster
2008-08-22 18:11               ` Vitaly Mayatskikh
2008-08-23  9:19                 ` David Engster
2008-08-23 11:32                   ` Vitaly Mayatskikh
2008-08-23 14:52                     ` David Engster
2008-08-24  8:47                       ` Vitaly Mayatskikh
2008-08-24 18:09                         ` David Engster
2008-08-24 19:29                           ` Reiner Steib
2008-08-24 23:39                             ` David Engster
2008-08-25 19:22                               ` James Cloos
2008-08-25  0:00                           ` Daniel Pittman
2008-08-25  9:46                             ` David Engster
2008-08-25 18:02                               ` Ted Zlatanov
2008-08-25 19:50                                 ` David Engster
2008-08-25  8:05                           ` Vitaly Mayatskikh
2008-08-25 12:25                             ` David Engster [this message]
2008-08-25 13:17                               ` Vitaly Mayatskikh
2008-08-25 17:53                         ` Ted Zlatanov
2008-08-24  9:18                       ` Vitaly Mayatskikh
2008-08-24 10:08                         ` David Engster
2008-08-26 20:40                           ` Vitaly Mayatskikh
2008-09-03 11:55                             ` David Engster
2008-09-21  9:57                               ` David Engster
2009-12-07 18:57                                 ` Dan Christensen
2009-12-10 20:08                                   ` Dan Christensen
2009-12-11 20:36                                     ` David Engster
  -- strict thread matches above, loose matches on Subject: below --
2002-07-09  8:52 gnus and IMAP me
2002-07-09  9:29 ` Niklas Morberg
2002-07-09 10:17   ` me
2002-07-09 10:27   ` me
2002-07-09 10:52   ` me

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=kztzd9uvrj.fsf@kafka.physik3.gwdg.de \
    --to=deng@randomsample.de \
    --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).