From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/70352 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: Faster, lolcat. Faster! Date: Thu, 02 Sep 2010 15:00:06 +0200 Message-ID: References: <87aao05t55.fsf@lifelogs.com> <87bp8gflj5.fsf@keller.adm.naquadah.org> <87pqwwgyjb.fsf@mid.gehheimdienst.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283432458 7365 80.91.229.12 (2 Sep 2010 13:00:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Sep 2010 13:00:58 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M18737@lists.math.uh.edu Thu Sep 02 15:00:56 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Or9PT-000567-PI for ding-account@gmane.org; Thu, 02 Sep 2010 15:00:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Or9Or-0008WS-Cl; Thu, 02 Sep 2010 08:00:17 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Or9Op-0008WG-NO for ding@lists.math.uh.edu; Thu, 02 Sep 2010 08:00:15 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Or9On-0003cB-PA for ding@lists.math.uh.edu; Thu, 02 Sep 2010 08:00:15 -0500 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1Or9On-0004h9-00 for ; Thu, 02 Sep 2010 15:00:13 +0200 Original-Received: from [134.76.4.238] (helo=imac.local) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Or9Om-0006NT-I8 for ding@gnus.org; Thu, 02 Sep 2010 15:00:12 +0200 In-Reply-To: <87pqwwgyjb.fsf@mid.gehheimdienst.de> (Frank Schmitt's message of "Thu, 02 Sep 2010 13:44:40 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:70352 Archived-At: Frank Schmitt writes: > Julien Danjou 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