From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Async DNS lookups Date: Sat, 30 Oct 2010 13:57:22 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288439880 10248 80.91.229.12 (30 Oct 2010 11:58:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Oct 2010 11:58:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 30 13:57:58 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PCA4G-0004Pt-J4 for ged-emacs-devel@m.gmane.org; Sat, 30 Oct 2010 13:57:52 +0200 Original-Received: from localhost ([127.0.0.1]:39800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCA4F-0003rL-T9 for ged-emacs-devel@m.gmane.org; Sat, 30 Oct 2010 07:57:51 -0400 Original-Received: from [140.186.70.92] (port=38487 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCA47-0003rC-Hg for emacs-devel@gnu.org; Sat, 30 Oct 2010 07:57:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCA43-00068H-B3 for emacs-devel@gnu.org; Sat, 30 Oct 2010 07:57:43 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:36343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCA42-00067o-WF for emacs-devel@gnu.org; Sat, 30 Oct 2010 07:57:39 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PCA3w-0004DQ-Oz for emacs-devel@gnu.org; Sat, 30 Oct 2010 13:57:32 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Oct 2010 13:57:32 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Oct 2010 13:57:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXUqnqOWzICAQFMKx4I AwUCAAEHAQIcDQxJsUk9AAACZklEQVQ4jWWTQXOjMAyFxXRmz3jIJHcVk2uzztbnghbu7rq9bolj 7oTGf38lCN3s7EvCxPp4kowFaK29d16ui5yWpQPnkeWc0xodyhfnCKBn7HjhtdeoncZFAiQV38Uh jrvZpBE0clYndbiagMWkgUv1KLkccgOSRIhjh39rq7LCM9b4JtVmMUD8RVRi7Ou2LM/u7Ku4gv2E Q9vRVIZ9XfW+bGPsveau9mlMoaPUUVdXiAtwgO6dQdfROFEaiRMQ0U8GHvfm05YNXlNKV2r7/cTA cSp8ND9s15TXNF6mttJDSt1YnbndV/PdNE052WSeY0QBnxWCdwJMcxlTuthI1HHKT3Z4/24uhmUv /CGKDYNxBo9mlU0TxUFA7MG5Pecwd0o29aGH21PWyDzFwJuglKq2Bu06tcqYqbGczb6Fmh0Nh0CU Z7D5UDtKpqcaqqoplMohA3jKYTuwwxwjgzYujkwQbF7UhtTuSsTgpMSxaHuaAT8uqASYFewGcxRH EDDkMAM1Ow67qHYtTQIU5EtPAtJmBkeoqFNZdmsYti8FOwrLjrId1gKg1DPvg8FSfFB5DgvMGNjZ MQN7gLXh7e9MHGkGwT49HPJ1H4VdQQjJFOYATwK+ndQurKDqUrNpGHBnm4/sq3gYJL9sQmXcVcb7 KPhQgE9fcjxkhU3Uxg91jMYIaEPgs04UFzXFCvjXrlHWiQ8jn1O18R8N6RpSkuIU/5OM3MTgzsMD IqNkF3BTkNBBRkU0zcUlKrG/Y2SOME/YffQLdLdwpuRAVnKE7u72FRQCGvbJX1l/hQXI616X/FIi IS2q5fIHX2sAkGc7J3EAAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: Various's _Rough Trade Shops - Counter Culture 05 (1)_: "Ana da Silva - Disco Ball" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:MZx5w9JM2wmNbLKCTibOmcoPS9E= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132185 Archived-At: I've been trying to chase down reasons for why url-retrieve sometimes makes Emacs totally unresponsive, and I suspect that it has to do with DNS lookups. Gnus is triggering url-retrieve asynchronously from a process filter. url-retrieve then has to resolve the domain name, of course, and then do the HTTP stuff. If the DNS resolving fails, or it's slow, then Emacs will hang entirely while resolving the domain names. Which is bad. I don't really see any easy fixes for this with Emacs' feature set at the moment. A process filter will block Emacs' "main thread", and it needs to resolve the addresses, so... However, we could side-step the issue by either: 1) implement a C-level resolving functionality that has a callback that will be called upon resolving the address. This seems hard. 2) add a callback mechanism to dns.el. Somebody kah-razy has already implemented a resolver in Emacs Lisp, so that seems like a possible option. But can you have process filters/sentinels on UDP processes? Before I do anything here, does anybody have any thoughts on this issue? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen