Gnus development mailing list
 help / color / mirror / Atom feed
From: David Engster <deng@randomsample.de>
To: ding@gnus.org
Subject: Re: Asynchroneous image retrieval in HTML rendering
Date: Thu, 05 May 2011 16:01:34 +0200	[thread overview]
Message-ID: <m27ha59rgh.fsf@randomsample.de> (raw)
In-Reply-To: <87tyd9jt0r.fsf@gmail.com> (Antoine Levitt's message of "Thu, 05 May 2011 13:17:40 +0200")

Antoine Levitt writes:
> 05/05/11 12:48, Ted Zlatanov
>> On Mon, 02 May 2011 19:40:43 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 
>>
>> LMI> The next thing to tackle is doing the DNS resolving asynchronously.
>
>> ...
>> LMI> If only somebody could implement an async C-level resolver.  :-)
>>
>> On Thu, 05 May 2011 10:25:15 +0200 Julien Danjou <julien@danjou.info> wrote: 
>>
>> JD>     http://www.corpit.ru/mjt/udns.html
>>
>> On Wed, 04 May 2011 20:40:58 +0200 Simon Josefsson <simon@josefsson.org> wrote: 
>>
>> SJ> http://www.chiark.greenend.org.uk/~ian/adns/
>>
>> Has anyone tested to see if DNS lookups are actually a problem?  Test an
>> entirely local page vs. a page with lots of remote image URLs.  I don't
>> see a difference on my machine.
>
> Maybe your connexion or DNS servers are better than mine, or some other
> parameter is different, but I definitely experienced freezes that were
> DNS-related. Lars also pointed out explicitely resolving the DNS in
> /etc/hosts sped things up immensely for gwene.com.wordpress.terrytao, so
> you could try this if you're not convinced by my admitedly
> non-repeatable arguments.

I highly doubt this has anything to do with DNS. Usually there's some
kind of cache involved and you shouldn't notice any delay after the
first request. Just run tcpdump and look at the traffic. I see exactly
one DNS request, but I still see a massive delay when retrieving
articles from the mentioned group.

I also see an insane amount of connections the Emacs url package is
opening. There seems to be no upper limit. Just use

(setq url-debug t)

and look in the *URL DEBUG* buffer, or use netstat to see the amount of
connections. It's more or less a little DoS on the server (I've seen
over 200 connections easily), and most servers are configured to
throttle stuff like this. You then have over 200 sentinels waiting to
parse the HTTP headers. No wonder this is slow. The right thing to do is
to open a moderate amount of connections (the max-connections-per-server
in Firefox is 15) and then reuse those.

> I don't know why, but DNS results don't seem to be cached. I don't know
> much about DNS queries so I'm not sure if that's supposed to be the case
> or not.

Usually your local server will cache them for you. Some OS also have
some kind of caching server running, which usually caches a bunch of
services at once (DNS, LDAP, etc.).

-David



  parent reply	other threads:[~2011-05-05 14:01 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 22:18 Antoine Levitt
2011-04-28 20:03 ` Antoine Levitt
2011-04-29  9:04 ` Julien Danjou
2011-04-29  9:18   ` Antoine Levitt
2011-04-29 10:01     ` Julien Danjou
2011-04-29 20:34       ` Antoine Levitt
2011-05-01 15:13         ` Lars Magne Ingebrigtsen
2011-05-01 15:23           ` Antoine Levitt
2011-05-01 15:42             ` Lars Magne Ingebrigtsen
2011-05-01 16:06               ` Lars Magne Ingebrigtsen
2011-05-01 16:34                 ` Adam Sjøgren
2011-05-01 16:45                   ` Lars Magne Ingebrigtsen
2011-05-01 17:15                 ` Antoine Levitt
2011-05-02  7:52               ` Antoine Levitt
2011-05-02 14:30                 ` Lars Magne Ingebrigtsen
2011-05-02 14:53                   ` Antoine Levitt
2011-05-02 15:17                     ` Lars Magne Ingebrigtsen
2011-05-02 17:08                   ` Lars Magne Ingebrigtsen
2011-05-02 17:24                     ` Antoine Levitt
2011-05-02 17:40                       ` Lars Magne Ingebrigtsen
2011-05-02 21:52                         ` Antoine Levitt
2011-05-04 18:40                         ` Simon Josefsson
2011-05-30 20:55                           ` Lars Magne Ingebrigtsen
2011-05-05  8:25                         ` Julien Danjou
2011-05-30 20:56                           ` Lars Magne Ingebrigtsen
2011-05-05 10:48                         ` Ted Zlatanov
2011-05-05 10:58                           ` Julien Danjou
2011-05-05 11:17                           ` Antoine Levitt
2011-05-05 13:51                             ` Ted Zlatanov
2011-05-05 14:01                             ` David Engster [this message]
2011-05-05 14:07                               ` Julien Danjou
2011-05-05 15:05                               ` Lars Magne Ingebrigtsen
2011-05-05 19:49                                 ` David Engster
2011-05-05 20:07                                   ` Lars Magne Ingebrigtsen
2011-05-05 14:25                             ` David Engster
2011-05-05 14:34                               ` Antoine Levitt
2011-05-05 14:59                                 ` David Engster
2011-05-05 15:00                                   ` David Engster
2011-05-02 17:53                       ` Lars Magne Ingebrigtsen
2011-05-02 18:18                         ` Lars Magne Ingebrigtsen
2011-05-02 17:12                   ` Ted Zlatanov
2011-05-02 17:20                     ` Lars Magne Ingebrigtsen
2011-05-02 21:18                       ` Steinar Bang
2011-05-02 22:40                         ` Lars Magne Ingebrigtsen
2011-05-03 14:09                           ` Ted Zlatanov
2011-05-03 18:48                             ` Steinar Bang
2011-05-02 21:15                   ` 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=m27ha59rgh.fsf@randomsample.de \
    --to=deng@randomsample.de \
    --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).