From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68849 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus' speed Date: Thu, 30 Jul 2009 15:58:37 +1000 Organization: How about yours? http://rimspace.net/resume/ Message-ID: <871vnysodu.fsf@rimspace.net> References: <87zlao7j1z.fsf@CPU107.opentrends.net> <87iqhb7w7a.fsf@CPU107.opentrends.net> <873a8f8i0b.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1248935776 2203 80.91.229.12 (30 Jul 2009 06:36:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2009 06:36:16 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17267@lists.math.uh.edu Thu Jul 30 08:36:09 2009 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.50) id 1MWPFH-00026s-Ge for ding-account@gmane.org; Thu, 30 Jul 2009 08:36:07 +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 1MWPEY-0005fq-3r; Thu, 30 Jul 2009 01:35:22 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1MWOhj-0005Un-Nv for ding@lists.math.uh.edu; Thu, 30 Jul 2009 01:01:27 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MWOhh-0003q5-O0 for ding@lists.math.uh.edu; Thu, 30 Jul 2009 01:01:27 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MWOiG-0000Qp-00 for ; Thu, 30 Jul 2009 08:02:00 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MWOhb-000745-LV for ding@gnus.org; Thu, 30 Jul 2009 06:01:19 +0000 Original-Received: from sdcarl02.strategicdata.com.au ([203.214.67.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2009 06:01:19 +0000 Original-Received: from daniel by sdcarl02.strategicdata.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2009 06:01:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sdcarl02.strategicdata.com.au User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) Cancel-Lock: sha1:ItMnPBEmuYxglUwvcTHiTIphwUA= X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68849 Archived-At: Ted Zlatanov writes: > On Wed, 29 Jul 2009 10:03:05 +0200 Daniel Clemente wrote: > > DC> El dt, jul 28 2009 a les 23:03, Leo va escriure: >>> and Gnus has been pretty fast except when >>> downloading attachments. > > DC> I experience this too. When I press ENTER, Gnus downloads all > DC> attachments by default, even if they are >10 Mb and I don't want > DC> them. Probably there's a variable which says „only download > DC> attachments when I ask you to“, but I don't know which > DC> one. gnus-.*attachment didn't match any. > > IMAP, at least, supports downloading any part of a MIME message > individually. I don't believe Gnus uses that functionality but it > could. It does, indeed. > I think the backend rewrite would be fairly minor, but there are many > internal and user-visible functions in Gnus that also will need to be > modified. It's a lot of work. I think that saying "fairly minor" is misleading here: adding the capability to the IMAP backend isn't enormously hard, but defining a sound (and portable) API, and implementing it, is quite non-trivial. As a guide, if someone does want to do this, from when I investigated this some time back I found the best strategy was likely to be: 1. Define an API for "obtain the MIME structure" in the back-ends. 2. Implement it in the "front-end" based on fetching the whole article. You need this later anyhow. 3. Replace all the bits of code scattered all over the place that take the whole article and look for structure with use of the API above. Just keep fetching the whole article and all at this point, when it comes to getting the data out. 4. Replace the front-end MIME structure code with a back-end API, and use the same code for the default implementation for back-ends that don't provide an optimized version. 5. Maybe, add an IMAP version at this point. 6. Define an API for fetching a MIME part based on the structure. 7. Provide a default implementation, then move down code that parses the article into parts into the content. 8. Replace all the code that assumes it sits in a full article buffer with something like '(gnes-in-article-buffer &body)' that will build a suitable buffer, then run the old code. 9. Gradually replace instances of that with content-aware versions of the same. That way you can release something useful along the way, building useful code at each stage, without having to get everything done at once. You can look forward to person-months if not person-years of work in the transition, though. Regards, Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons