Gnus development mailing list
 help / color / mirror / Atom feed
From: David Engster <deng@randomsample.de>
To: ding@gnus.org
Subject: Re: Faster, lolcat.  Faster!
Date: Thu, 02 Sep 2010 15:00:06 +0200	[thread overview]
Message-ID: <m27hj447xl.fsf@engster.org> (raw)
In-Reply-To: <87pqwwgyjb.fsf@mid.gehheimdienst.de> (Frank Schmitt's message of "Thu, 02 Sep 2010 13:44:40 +0200")

Frank Schmitt writes:
> Julien Danjou <julien@danjou.info> writes:
>
>> On Thu, Sep 02 2010, Ted Zlatanov wrote: 
>>
>>> In the "too slow to be done properly" category are the unread/unseen
>>> nnimap counts which as you know are usually inaccurate.  We've had
>>> patches over the years but I don't think anyone has actually solved
>>> the problem. 
>>
>> +1
>>
>> The way I fix it is by running M-g over all the group.
>> Which is even slower.
>
> me2. This really, really sucks.

This was last discussed here:

http://article.gmane.org/gmane.emacs.gnus.general/67238

The idea was to make Gnus able to see the whole list of available
article numbers on the server. Currently, due to its roots in NNTP, it
only uses the active information (lowest . highest). 

Vitaly had some patches which extended gnus-active to either be a cons
or a list, containing the old active information or the full list of
article numbers, resp. My opinion was that it would be better to leave
gnus-active alone and introduce a new function in the back end API for
this. In fact, there already is an (more or less undocumented) function
`gnus-request-group-articles', which is implemented for NNTP. However,
it's straightforward to do for nnimap, for example:

(deffoo nnimap-request-group-articles (group &optional server)
  (nnimap-possibly-change-group group server)
  (let ((articles (with-current-buffer nnimap-server-buffer
		    (imap-search "ALL"))))
    (if articles
      (with-current-buffer nntp-server-buffer
	(erase-buffer)
	(insert 
	 (format "211 %d %d %d %s\n"
		 (length articles)
		 (car articles)
		 (car (last articles))
		 group))
	(insert (mapconcat
		 'number-to-string
		 articles
		 "\n"))
	(insert "\n.\n")
	t)
      nil)))

The complicated part is to use this function in the general Gnus back
end. It's pretty scary down there.

-David



  reply	other threads:[~2010-09-02 13:00 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02  2:22 Lars Magne Ingebrigtsen
2010-09-02  2:41 ` Ted Zlatanov
2010-09-02  2:52   ` Lars Magne Ingebrigtsen
2010-09-02  4:48 ` Daniel Pittman
2010-09-02 14:26   ` Lars Magne Ingebrigtsen
2010-09-02 19:44   ` Russ Allbery
2010-09-02  5:20 ` David Engster
2010-09-02 14:15   ` Lars Magne Ingebrigtsen
2010-09-15 22:53   ` Tom Tromey
2010-09-02  7:29 ` Steinar Bang
2010-09-02 10:36 ` Ted Zlatanov
2010-09-02 11:10   ` Julien Danjou
2010-09-02 11:44     ` Frank Schmitt
2010-09-02 13:00       ` David Engster [this message]
2010-09-02 13:27         ` Ted Zlatanov
2010-09-02 14:23           ` Lars Magne Ingebrigtsen
2010-09-02 14:39             ` David Engster
2010-09-03 12:49               ` request-group-articles for nnimap (was: Faster, lolcat. Faster!) Ted Zlatanov
2010-09-03 18:10                 ` request-group-articles for nnimap David Engster
2010-09-03 18:27                   ` Lars Magne Ingebrigtsen
2010-09-07 15:45                   ` Ted Zlatanov
2010-09-02 14:17   ` Faster, lolcat. Faster! Lars Magne Ingebrigtsen
2010-09-03 12:44     ` Ted Zlatanov
2010-09-03 13:08       ` Lars Magne Ingebrigtsen
2010-09-02 11:13 ` Julien Danjou
2010-09-02 12:44   ` Ted Zlatanov
2010-09-02 13:04     ` Julien Danjou
2010-09-02 13:15       ` Adam Sjøgren
2010-09-02 13:23       ` Ted Zlatanov
2010-09-02 13:25       ` Steinar Bang
2010-09-02 17:10 ` James Cloos
2010-09-03 16:59   ` Lars Magne Ingebrigtsen
2010-09-02 22:33 ` Romain Francoise
2010-09-03 17:01   ` Lars Magne Ingebrigtsen
2010-09-04 17:20     ` Lars Magne Ingebrigtsen
2010-09-04 17:57       ` Lars Magne Ingebrigtsen
2010-09-04 18:31         ` Adam Sjøgren
2010-09-04 18:34           ` Lars Magne Ingebrigtsen
2010-09-04 18:45             ` Adam Sjøgren
2010-09-04 18:48               ` Adam Sjøgren
2010-09-04 18:53                 ` Lars Magne Ingebrigtsen
2010-09-04 21:30                   ` Lars Magne Ingebrigtsen
2010-09-04 21:36                     ` Lars Magne Ingebrigtsen
2010-09-04 21:57                       ` Lars Magne Ingebrigtsen
2010-09-04 22:45                         ` Lars Magne Ingebrigtsen
2010-09-04 22:50                           ` Lars Magne Ingebrigtsen
2010-09-04 23:03                             ` Adam Sjøgren
2010-09-05  0:19                               ` Lars Magne Ingebrigtsen
2010-09-05 11:58                                 ` Adam Sjøgren
2010-09-05  9:10                             ` Romain Francoise
2010-09-05  9:59                               ` Steinar Bang
2010-09-05  9:06                     ` Romain Francoise
2010-09-05 11:31                       ` Lars Magne Ingebrigtsen
2010-09-05 12:44                         ` Romain Francoise
2010-09-05 12:58                           ` Lars Magne Ingebrigtsen
2010-09-04 18:50               ` Adam Sjøgren
2010-09-04 19:31                 ` Adam Sjøgren
2010-09-04 19:49       ` Romain Francoise
2010-09-04 19:57         ` Lars Magne Ingebrigtsen
2010-09-04 20:08           ` Lars Magne Ingebrigtsen
2010-09-04 20:17             ` Lars Magne Ingebrigtsen
2010-09-04 22:01               ` James Cloos
2010-09-04 22:14                 ` Lars Magne Ingebrigtsen
2010-09-05 21:25                   ` James Cloos
2010-09-05 22:21                     ` Lars Magne Ingebrigtsen
2010-09-06 19:05                       ` James Cloos
2010-09-06 19:58                         ` Lars Magne Ingebrigtsen
2010-09-05 22:41                     ` Lars Magne Ingebrigtsen
2010-09-05 22:48                       ` Lars Magne Ingebrigtsen
2010-09-04 23:10                 ` Steinar Bang
2010-09-04 22:44               ` Romain Francoise
2010-09-04 22:47                 ` Lars Magne Ingebrigtsen
2010-09-04 20:12           ` Adam Sjøgren
2010-09-04 22:16           ` Romain Francoise
2010-09-04 23:00             ` Lars Magne Ingebrigtsen
2010-09-05  8:59               ` Romain Francoise
2010-09-05 11:29                 ` Lars Magne Ingebrigtsen
2010-09-04 22:37       ` Steinar Bang
2010-09-04 22: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=m27hj447xl.fsf@engster.org \
    --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).