Subject: bug#17284: Host name completion in shell mode take 45 seconds

From: Nicolas Richard <[email-masked]>
Date: Fri, 03 Apr 2015 07:39:52 +0200

Svend Sorensen <[email-masked]> writes:
> (while (and (looking-back ",")
>                       (re-search-forward host-re (line-end-position) t))
>             (add-to-list 'ssh-hosts-list (concat (match-string 1)
>                                                  (match-string 2))))
>
> If I remove this, I get back a list of hosts immediately.
>
> My known_hosts file has 3600 lines.

Hello,

Does it help to replace (looking-back ",") by (eq ?, (char-before)) ?

Nicolas.