[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Async DNS lookups

From: Lars Magne Ingebrigtsen
Subject: Async DNS lookups
Date: Sat, 30 Oct 2010 13:57:22 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

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.)
  address@hidden * Lars Magne Ingebrigtsen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]