Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
To: ding@gnus.org
Subject: Re: Gnus' speed
Date: Thu, 30 Jul 2009 15:58:37 +1000	[thread overview]
Message-ID: <871vnysodu.fsf@rimspace.net> (raw)
In-Reply-To: <873a8f8i0b.fsf@lifelogs.com>

Ted Zlatanov <tzz@lifelogs.com> writes:
> On Wed, 29 Jul 2009 10:03:05 +0200 Daniel Clemente <dcl441-bugs@yahoo.com> 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




  reply	other threads:[~2009-07-30  5:58 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 18:34 Daniel Clemente
2009-07-28 21:03 ` Leo
2009-07-29  8:03   ` Daniel Clemente
2009-07-29  8:44     ` David Engster
2009-07-29 11:03       ` Karl Kleinpaste
2009-07-29 11:59         ` David Engster
2009-07-29 12:26           ` Karl Kleinpaste
2009-07-29 12:44             ` David Engster
2009-07-29 18:30               ` Ted Zlatanov
2009-07-29 20:19                 ` Tom Tromey
2009-07-30  6:03                   ` Daniel Pittman
2009-07-31  6:30                 ` Bill White
2009-07-29 18:46           ` Reiner Steib
2009-08-15  1:07           ` Miles Bader
2009-08-15  1:50             ` Daniel Pittman
2009-07-29 18:25       ` Ted Zlatanov
2009-07-29  9:47     ` Leo
2009-07-29 18:24     ` Ted Zlatanov
2009-07-30  5:58       ` Daniel Pittman [this message]
2009-07-30 13:33         ` Ted Zlatanov
2009-07-31  5:06           ` Daniel Pittman
2009-08-02 14:20       ` Steinar Bang
2009-08-03 14:38         ` Ted Zlatanov
2009-07-30  5:59     ` Daniel Pittman
2009-07-29  7:07 ` CHENG Gao
2009-07-29 18:20   ` nnrss through Google Reader (was: Gnus' speed) Ted Zlatanov
2009-07-31 13:44     ` nnrss through Google Reader Ted Zlatanov
2009-07-30  0:38   ` Gnus' speed Kevin Ryde
2009-07-29 18:55 ` Reiner Steib
2009-07-30  0:29   ` Kevin Ryde
2009-07-30  7:41     ` Adam Sjøgren
2009-08-04  1:10       ` Kevin Ryde
2009-08-15  1:11     ` Miles Bader
2009-08-15  8:28       ` Steinar Bang
2009-08-16  3:50         ` Miles Bader
2009-08-04 17:48   ` Daniel Clemente
2009-08-04 17:46 ` Daniel Clemente
2009-08-05  5:52   ` Steinar Bang
2009-08-05  5:55     ` Steinar Bang
2009-08-05  8:20       ` Daniel Clemente
2009-08-05 15:10         ` Steinar Bang

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=871vnysodu.fsf@rimspace.net \
    --to=daniel@rimspace.net \
    --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).