Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: url-retrieve parallelism
Date: Sun, 19 Dec 2010 01:45:50 +0100	[thread overview]
Message-ID: <m3d3oyh9oh.fsf@quimbies.gnus.org> (raw)

shr (and gnus-html, I guess) fire off a call to `url-retrieve' for every
<img> it finds.  If a HTML message has 1000 <img>s, then Emacs is going
to do a DOS of the poor image web server.

We obviously want to have more than a single `url-retrieve' call going
at once, but we want to rate-limit this somewhat.  To perhaps 10 at a
time?  So we need some kind of easy callback-ey interface, I think...
But I'm wondering whether to make it a totally general library, that
would be, like:

(defun concurrent (concurrency function callback callback-arguments)
  ...)

So FUNCTION would be required to return a process object (and have a
parameter list based on `url-retrieve', which seems quite sensible), and
CONCURRENT would just maintain a queue of processes, and fire off a new
one (if any) when something returns, and so on...

Would this be useful, or is my master's in Over Engineering showing
again?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




             reply	other threads:[~2010-12-19  0:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-19  0:45 Lars Magne Ingebrigtsen [this message]
2010-12-19  2:58 ` Philipp Haselwarter
2010-12-19 15:38   ` Lars Magne Ingebrigtsen
2011-01-19 22:20     ` Ted Zlatanov
2010-12-19  8:32 ` Steinar Bang
2010-12-19  8:38   ` Steinar Bang
2010-12-19  9:02     ` Steinar Bang
2010-12-19 15:39       ` Lars Magne Ingebrigtsen
2010-12-19  9:16 ` David Engster
2010-12-19 15:41   ` Lars Magne Ingebrigtsen
2010-12-19 16:50 ` Julien Danjou
2010-12-19 17:01   ` Lars Magne Ingebrigtsen
2010-12-21  1:22     ` Katsumi Yamaoka
2010-12-21  1:33       ` Lars Magne Ingebrigtsen
2010-12-21  7:52         ` Robert Pluim
2011-01-02  6:53     ` Lars Magne Ingebrigtsen

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=m3d3oyh9oh.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --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).