From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS resolving Date: Fri, 13 Feb 2015 16:06:19 -0800 Message-ID: <2CD6D564-472D-4D58-BB6C-F6FD949D5D34@gmail.com> References: <877fvmffrz.fsf@building.gnus.org> <54DDA602.7090504@cs.ucla.edu> <87d25ep8po.fsf@building.gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1423872410 669 80.91.229.3 (14 Feb 2015 00:06:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 00:06:50 +0000 (UTC) Cc: Lars Ingebrigtsen , Stefan Monnier To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 14 01:06:41 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMQFs-0002px-RO for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2015 01:06:40 +0100 Original-Received: from localhost ([::1]:58014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMQFs-0005ua-1n for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2015 19:06:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMQFf-0005uK-83 for emacs-devel@gnu.org; Fri, 13 Feb 2015 19:06:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMQFc-0007IN-0o for emacs-devel@gnu.org; Fri, 13 Feb 2015 19:06:27 -0500 Original-Received: from mail-pd0-f174.google.com ([209.85.192.174]:41411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMQFb-0007ID-Qz for emacs-devel@gnu.org; Fri, 13 Feb 2015 19:06:23 -0500 Original-Received: by pdno5 with SMTP id o5so22515329pdn.8 for ; Fri, 13 Feb 2015 16:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Y/0xMrWgHQWfNjXMzFOc/jQzRyU27EbXPf/OB3w0U/I=; b=p3dXzkOIfvcLQUEzA67VcnNJKKht64OpRvE2uLgKbMCrNed+9TndcAzOhiO5oslAr0 R9mRqxOgnOhqP6olM++ip0ZZXYM5adqhHKA48vC2rPJbLJJX+G1zHnXpgHopOpOhFcRX deEqG4B/nPysWwxvA0hHIDDsegFBIS74UGkYn213mXaPFcWRY4SU3KRrHUGXoltCLQX9 S0FmnbGFalkFauYm6MP52zfVwT9CKrReLdIVTEtCP0YusmM+vHwpZPGp45t0vJ8JCOXC X1K1B4W9k1b/dI+73S4h8MSG8yRaOmnho646tE1xbn0vM5u//mzj2t0AgQ0u748dksIS IDVQ== X-Received: by 10.66.65.138 with SMTP id x10mr19457777pas.74.1423872382266; Fri, 13 Feb 2015 16:06:22 -0800 (PST) Original-Received: from [172.16.2.230] (50-194-51-49-static.hfc.comcastbusiness.net. [50.194.51.49]) by mx.google.com with ESMTPSA id fl4sm7862216pab.8.2015.02.13.16.06.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Feb 2015 16:06:21 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.2070.6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.174 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183035 Archived-At: Not what you asked, but related: Modern browsers use a technique called DNS pre-fetching to increase the responsiveness of their UI. More or less, they pre-resolve the DNS names of every link on a page when rendering it (usually with some async technique). This helps with both images and links, which can be a pretty big deal with a typical Web 2.0 page that has links and images from many domains (for example: the host site, its CDN, a comments site, and anywhere between a passel and a gaggle of social media buttons). There are some downsides to consider, unfortunately. Many CDNs really want a very short TTL on their resolves, and there are even (I hear) some systems that use a system of ephemeral names in such links to track users across sites (potentially bypassing cookies, privacy policies, and anonymizing services). I suspect that eww would like DNS pre-fetching anyway, but you might want a way to turn it off. I mention this now because it conflicts with the suggestion that you can just make the entire open-network-stream (etc) process async, and avoid the question at the level of eww. Put another way, you probably *can* do that, but youll be giving up a potentially valuable browser speed-up. I hope that helps, ~Chad