From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78616 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Asynchroneous image retrieval in HTML rendering Date: Sun, 01 May 2011 17:42:06 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <87bozwfw84.fsf@gmail.com> <87r58ll8jm.fsf@gmail.com> <87liys4x04.fsf@gmail.com> <87tydewilm.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304264587 9718 80.91.229.12 (1 May 2011 15:43:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 May 2011 15:43:07 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M26918@lists.math.uh.edu Sun May 01 17:43:04 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 1QGYnW-0007Uw-1M for ding-account@gmane.org; Sun, 01 May 2011 17:43:02 +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 1QGYn0-00019T-TG; Sun, 01 May 2011 10:42:30 -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 1QGYmz-00019J-CU for ding@lists.math.uh.edu; Sun, 01 May 2011 10:42:29 -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 1QGYmp-00077E-QX for ding@lists.math.uh.edu; Sun, 01 May 2011 10:42:29 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QGYmn-0000Xa-Vy for ding@gnus.org; Sun, 01 May 2011 17:42:17 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QGYmn-00072y-2A for ding@gnus.org; Sun, 01 May 2011 17:42:17 +0200 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 May 2011 17:42:17 +0200 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 May 2011 17:42:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVcZIg4Mjnb3PL07vqI kbE9PlB3f6A4JAy0u9iYoMPQ0+wZCwOnrs1FTWzl4vXDyOTdsvCXAAACSElEQVQ4jWWSoYsbURDG R9VFBHpEHDVPhpKK9VFLqKhooCsqDiKOQEVFxPEo+QdWLMSsWTg4WFWeiYxYW5GFhTsTVdbs+SdK xRLzOt+8l16aDsR8v/fNNzMbKm0URdMoslap0hjjnEuzpqnJTKy1Hf8YqLEHKcDRKGVVJzqDLfSs bgpyplS2e/fhbZ03v/OH2/c9G+p7DyZqvN/26fH7/rHZCyiCQ/oojpZOF8BlLD26XmYqcnKcLiN9 qeP49oEbZTDEwdH5Ts4hoSmKPKbNsZzwdl2nQkIGEDMwvDt2PAEkxPGMXMlgiov47YJhRkc1eY5w qjEcfRr0JUCEM1q5kxhy1pf0y4PIdtLpZFhSaa04pgA9dhDDgpQHEQOZFYYlG2gSHGiVngwLAohC xrb3yQG8dNr2cj10ohdglXEMOMAnMAjTjp3L5H0wkPIhDHo5kjcMWgA5CX9ajMorcPSgbQlf49lO O5416GxoAcb47/CwaeNv4Q0tGVMafD5ewgd4Q4tvLsXR4b0YGKDkrj9mfgPRE0rTTb+R/0Yuz32j m4T2KWrPM80W0J+gH5KEmlB1PqPQJ0FRc4/T4aryfiDPAapvBYqP5OcPOoPP+GY4tqSegdcxikcd nOsJ/fwU+40XF+D6zeHqSS5xrg/nVFVa69WrBZ2D+XVF0Lk+BoDXybCqKtI7T+4GLALMh6NKwLrS a63Xuzt+fMOd5uvKA8gaRCctg5HXAUKt9erQHkb6AkjS6uv8PyB1xcFB/wcMpRjtzsFoNfxbmsEf UOhcxCnJY8sAAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: Mia Clarke & Ando Moor's _Guitargument_: "Guitargument Part 2" User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:0qQF1fHAx/G6RVznZv/lURy3WZk= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78616 Archived-At: Antoine Levitt writes: >> I think the fix here might be to introduce a new variable >> `url-asynchronous-dns-lookup' (or something), and then have shr bind it >> to make url.el more asynchronous. The pauses we experience today when >> trying to do asynchronous URL retrieval aren't acceptable. Especially >> if a domain is down or semi-down -- reading the articles becomes almost >> impossible. Oopsie. Actually, the image retrieval in Emacs 24 was extremely synchronous. Due to changes in `open-network-stream', the :nowait flag was no longer passed on, so all connections were established synchronously, even if url.el tried to do it asynchronously. I've now fixed this and pushed the fix to Emacs 24. > Why is DNS even synchroneous in the first place? I'd expect > "asynchroneous" to mean that both DNS lookup and data transfer are > non-blocking. Emacs uses the built-in resolver (from C), and it does it in the main Emacs thread. So whenever you resolve something in Emacs, *everything* in Emacs stops. I've written the dns.el resolver in Emacs Lisp, but, of course, it's not as sturdy as the libc one. (And only works on Linux.) A better fix would be to write a C-level resolver that forks its own thread, does the resolving, and then does a callback. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/