From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78715 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: Asynchroneous image retrieval in HTML rendering Date: Thu, 05 May 2011 16:01:34 +0200 Message-ID: References: <87bozwfw84.fsf@gmail.com> <87r58ll8jm.fsf@gmail.com> <87liys4x04.fsf@gmail.com> <87tydewilm.fsf@gmail.com> <87liyp35fy.fsf@gmail.com> <87k4e92eyx.fsf@gmail.com> <87k4e5h18p.fsf@lifelogs.com> <87tyd9jt0r.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304604145 16693 80.91.229.12 (5 May 2011 14:02:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 May 2011 14:02:25 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27017@lists.math.uh.edu Thu May 05 16:02:21 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHz8G-0006tb-Ou for ding-account@gmane.org; Thu, 05 May 2011 16:02:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QHz7l-0004Hp-Hn; Thu, 05 May 2011 09:01:49 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QHz7k-0004Hh-G8 for ding@lists.math.uh.edu; Thu, 05 May 2011 09:01:48 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QHz7g-0001GD-QM for ding@lists.math.uh.edu; Thu, 05 May 2011 09:01:48 -0500 Original-Received: from v3-1008.vxen.de ([79.140.41.8]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QHz7e-00077K-0Y for ding@gnus.org; Thu, 05 May 2011 16:01:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:To:From; bh=R0ZS+useX5JbXQMPsNF3RbXU0BxvTXGycqxWLSs7KHA=; b=oCAN5jIwxOJsYp8gCvC2aJFrSfFgHrqcegSPBbLYsndXTFplEeXIkWFMQBk05ZcsiRSfZI8Y8sxdFg/ktQnUdJP3WFnbdMQLP9666StEFtrgQOh+mEmKNgLShh5Tbfqt; Original-Received: from [134.76.4.230] (helo=imac.local) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QHz7c-0005zZ-SH for ding@gnus.org; Thu, 05 May 2011 16:01:40 +0200 In-Reply-To: <87tyd9jt0r.fsf@gmail.com> (Antoine Levitt's message of "Thu, 05 May 2011 13:17:40 +0200") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-1628--5925h-0s--0d--H*UA:Emacs, 0.000-1486--5408h-0s--0d--H*u:Emacs, 0.000-1407--5120h-0s--0d--H*UA:Gnus, 0.000-1407--5119h-0s--0d--H*u:Gnus, 0.000-773--2811h-0s--0d--H*i:message Spam tokens: 0.999-27217--223h-227504s--0d--UD:ru, 0.987-1--0h-1s--0d--D*info, 0.960-4283--1268h-46023s--0d--H*r:quimby.gnus.org Autolearn status: no 2.3 FSL_RU_URL URI: FSL_RU_URL -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78715 Archived-At: Antoine Levitt writes: > 05/05/11 12:48, Ted Zlatanov >> On Mon, 02 May 2011 19:40:43 +0200 Lars Magne Ingebrigtsen 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 wrote: >> >> JD> http://www.corpit.ru/mjt/udns.html >> >> On Wed, 04 May 2011 20:40:58 +0200 Simon Josefsson 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