Subject: bug#20015: 25.0.50; Slow Emacs startup after recent TRAMP changes

From: Daniel Colascione <[email-masked]>
Date: Fri, 06 Mar 2015 14:45:11 -0800

On 03/06/2015 02:34 PM, Daniel Colascione wrote:
> On 03/06/2015 11:17 AM, Andreas Schwab wrote:
>> Stefan Monnier <[email-masked]> writes:
>>
>>>>> % time getent ahosts host.does.not.exist
>>>>> getent ahosts host.does.not.exist  0,00s user 0,00s system 0% cpu 30,013 total
>>>> Which means your system is misconfigured.
>>>
>>> But that's no excuse to impose such a 30s timeout on the user who did
>>> not actually do anything that would explicitly trigger this problem.
>>
>> A working hostname lookup is a fundamental part of the system.
> 
> In theory. In practice, lookup is broken all the time, and for good
> reason. We can't always know right away when we don't have connectivity.
> What if I'm on a train and enter a tunnel? Connectivity is interrupted
> for a little while, but not enough to trigger OS network
> reconfiguration. It's inexcusable for Emacs to block for 30 seconds on
> DNS resolution in this case.

It's also unacceptable to start six (by my count) ssh subprocesses,
especially on systems like Cygwin, where process creation is very slow.
At the very least, this work needs to be delayed until someone tries to
use an ssh connection method, and the result should be called.