Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: Gnus' speed
Date: Thu, 30 Jul 2009 08:33:33 -0500	[thread overview]
Message-ID: <87d47i70sy.fsf@lifelogs.com> (raw)
In-Reply-To: <871vnysodu.fsf@rimspace.net>

On Thu, 30 Jul 2009 15:58:37 +1000 Daniel Pittman <daniel@rimspace.net> wrote: 

DP> Ted Zlatanov <tzz@lifelogs.com> writes:
>> 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.

DP> I think that saying "fairly minor" is misleading here: adding the capability
DP> to the IMAP backend isn't enormously hard, but defining a sound (and portable)
DP> API, and implementing it, is quite non-trivial.

I'd do it with the IMAP convention of "1.2.3" to mean part 3 of part 2
of part 1 as an optional parameter for the backend command to fetch the
body, and an extra backend command to get a message's structure (list of
strings as above with the associated data).  I'd move all the rest of
the code into a separate async-bodypart-fetch library that, given a list
of body parts, can interact with the existing Gnus user-facing
functionality that builds and interacts with the article buffer.  The
async-bodypart-fetch library should be usable by other ELisp-basedmail
clients, so it should not depend on any Gnus code.

DP> As a guide, if someone does want to do this, from when I investigated this
DP> some time back I found the best strategy was likely to be:

DP> 1. Define an API for "obtain the MIME structure" in the back-ends.
DP> 2. Implement it in the "front-end" based on fetching the whole article.
DP>    You need this later anyhow.
DP> 3. Replace all the bits of code scattered all over the place that take the
DP>    whole article and look for structure with use of the API above.
DP>    Just keep fetching the whole article and all at this point, when it comes
DP>    to getting the data out.

DP> 4. Replace the front-end MIME structure code with a back-end API, and use the
DP>    same code for the default implementation for back-ends that don't provide
DP>    an optimized version.
DP> 5. Maybe, add an IMAP version at this point.

DP> 6. Define an API for fetching a MIME part based on the structure.
DP> 7. Provide a default implementation, then move down code that parses the
DP>    article into parts into the content.

DP> 8. Replace all the code that assumes it sits in a full article buffer with
DP>    something like '(gnes-in-article-buffer &body)' that will build a suitable
DP>    buffer, then run the old code.
DP> 9. Gradually replace instances of that with content-aware versions of the
DP>    same.

DP> That way you can release something useful along the way, building useful code
DP> at each stage, without having to get everything done at once.  You can look
DP> forward to person-months if not person-years of work in the transition,
DP> though.

Your itemized list seems very thorough and you've obviously thought
about this more than I.  Are you interested in coordinating this effort?
If we present it appropriately (especially that it benefits all ELisp
mail clients, not just Gnus) we may get more help from the core Emacs
developers.  I could work on the backend fetch and the
async-bodypart-fetch library, but I doubt I would be helpful on the
front end, especially the code that generates the article buffer from a
message body.

Ted




  reply	other threads:[~2009-07-30 13:33 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
2009-07-30 13:33         ` Ted Zlatanov [this message]
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=87d47i70sy.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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).