paramiko.util.load_host_keys with big file known_hosts

Bug #419216 reported by Christophe GUILLOUX
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
paramiko
New
Undecided
Unassigned

Bug Description

(paramiko 1.7.5)
The function paramiko.util.load_host_keys is very low when known_hosts is big. I have 541 entries and it takes 1 minute.
(And i don't know how if it works with hashed host.) CPU load is 99%

One entry for example :
|1|ECaT+rJav/aUZOcW6ZJwXJonlGU=|2Z5AAk2zXhB5V3Ttv4bYcwxAn0g= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqw6g31pWeeArFvfLxy93Sl0uzVslnpXIwEI9GInpSlZFMcPd5xJq91mbP+9T9BJohusVrPnn4BKy4OMKzG1tON8+2aqJRIDth3Ac9zeRPVKrWzPanSvKZoMn3zBWTI9oCcsCmELKrYO1A2NosiI4mXuTW6HIBZs+f0ff6P3cvTT+PereGH6AoKORkV5nveJs84qiUj6ybU8E0ZXbF+Hua1toHIGE7wGyNSXGHII1BLI+b/aCZ/45wGmgvSc2K2WiRCuCEy8Z5zJD/oKOgyHP1JCOViE7Pac3IMhNhSTxRTnaWWiKQjpF+n/Y651Z+JC8PU6fc/mnQiV5UGvmzEiaXQ==

Revision history for this message
Robey Pointer (robey) wrote :

>>> print(time.time()); x = paramiko.HostKeys("/Users/robey/.ssh/known_hosts"); print(time.time())
1257132086.18
1257132086.32

$ wc -l ~/.ssh/known_hosts
     513 /Users/robey/.ssh/known_hosts

maybe something else is going on? python seems to load that file relatively quickly.

Revision history for this message
Christophe GUILLOUX (ubuntu-rootix) wrote :

Sorry, i forgot this bug.
No problem with my ubuntu 10.04, i think we can close the bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.