Gnus development mailing list
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
Cc: ding@gnus.org
Subject: IMAP partial fetch (was Re: Ideas for .no Gnus)
Date: Fri, 02 May 2003 17:12:15 -0700	[thread overview]
Message-ID: <874r4ckhwg.fsf@egil.codesourcery.com> (raw)
In-Reply-To: <u8ytpvybg.fsf@hschmi22.userfqdn.rz-online.de> (Frank Schmitt's message of "Fri, 02 May 2003 23:22:11 +0200")

Frank Schmitt <usereplyto@Frank-Schmitt.net> writes:

> Hello
>
> Now that Oort is released, I'd like to throw some ideas in, which
> features I as (primarily) a user would like to see in the next Gnus:
...

This is the first of my two wishes:

Consider the following imap-log extract (word-wrapped, CRs removed,
and censored):

59 UID FETCH 1:150 (UID
                    RFC822.SIZE
                    BODY
                    BODY.PEEK[HEADER.FIELDS
                     (Subject From Date Message-Id References
                      In-Reply-To Xref To Newsgroups)])

# ... 149 other responses ...

* 150 FETCH (UID 150 RFC822.SIZE 351157 BODY 
             (("text" "plain" 
               ("charset" "us-ascii" "format" "flowed") NIL NIL "8bit" 647 20)
              ("application" "msword"
               ("name" "xxxxxx.doc" "x-mac-type" "42494E41"
                "x-mac-creator" "4D535744") NIL NIL "base64" 348914)
              "mixed")
      BODY[HEADER.FIELDS 
            ("Subject" "From" "Date" "Message-Id" "References"
             "In-Reply-To" "Xref" "To" "Newsgroups")]
      {253}
Message-Id: ...
Date: ...
To: ...
From: ...
Subject: ...

)
59 OK FETCH completed.
60 UID FETCH 150 BODY.PEEK[]
* 150 FETCH (UID 150 BODY[] {351157}

# ... 351157 bytes of message body here ...

The server provided Gnus enough information to know that the message
was multipart, and the second part was a large binary attachment
(application/msword, 348914 bytes).  Yet Gnus downloaded the entire
message body.  I would like Gnus to use the IMAP partial-content-
request functionality to avoid downloading undisplayed attachments
until the user asks for them with the button commands.  In this case,
issuing

60 UID FETCH 150 (BODY.PEEK[HEADER] BODY.PEEK[1])

would have resulted in a transmission of only 1837 bytes of literal
data (1190 for BODY[HEADER], 647 for BODY[1]).  I suspect that this is
a major reason why Gnus is so slow to display articles in IMAP groups
with attachments.  In the case of the message above, I didn't bother
looking at the attachment, so Gnus need not have downloaded it at all;
for messages where the user does want to look at the attachment, they
are probably more willing to accept a lengthy download delay when they
ask for the attachment to be saved, than when they ask to view the
message.

The IMAP4 BODYSTRUCTURE request will reveal the Content-Disposition
annotation for attachments, if any, which may help decide whether or
not to download them.

zw



  parent reply	other threads:[~2003-05-03  0:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02 21:22 Ideas for .no Gnus Frank Schmitt
2003-05-02 23:48 ` Josh Huber
2003-05-08  9:23   ` Mike Woolley
2003-05-03  0:12 ` Zack Weinberg [this message]
2003-05-03  0:23   ` IMAP partial fetch Jody Klymak
2003-05-03  2:46   ` Lloyd Zusman
2003-05-03 16:59     ` Kai Großjohann
2003-05-07 20:42   ` Steinar Bang
2003-05-03  1:36 ` Ideas for .no Gnus Richard Hoskins
2003-05-03  5:02   ` Nevin Kapur
2003-05-12  0:03   ` Steve Youngs
2003-05-12  4:27     ` A.J. Rossini
2003-05-12  5:01     ` Richard Hoskins
2003-05-03  1:50 ` Ted Zlatanov
2003-05-03  2:29 ` A different spam model, which might be possible already (was Re: Ideas for .no Gnus) Zack Weinberg
2003-05-03 11:30   ` A different spam model, which might be possible already Ted Zlatanov
2003-05-04 16:39     ` Zack Weinberg
2003-05-04 22:32       ` Ted Zlatanov
2003-05-03 13:47   ` Andrew J. Korty
     [not found]   ` <m2llxo2lc3.fsf@ajk.local.>
2003-05-04 22:37     ` Ted Zlatanov
2003-05-03 17:13 ` Ideas for .no Gnus Kai Großjohann
2003-05-04 16:38   ` Lars Magne Ingebrigtsen
2003-05-05 13:17   ` Andreas Fuchs
2003-05-11 22:36   ` Alex Schroeder
2003-05-04  0:47 ` Nicer buttons (was: Ideas for .no Gnus) Jesper Harder
2003-05-04 13:59   ` Nicer buttons Julien Avarre
2003-05-04 14:15     ` luis fernandes
2003-05-04 14:52       ` Julien Avarre
2003-05-04 15:00       ` Jesper Harder
2003-05-05 17:23         ` luis fernandes
2003-05-04 16:41 ` Ideas for .no Gnus Lars Magne Ingebrigtsen
2003-05-05 13:12 ` Andreas Fuchs
2003-05-05 14:49   ` Kai Großjohann

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=874r4ckhwg.fsf@egil.codesourcery.com \
    --to=zack@codesourcery.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).