[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov
Nikolay Dyankov added the comment: OK, I found the reason and it is the very fact of using /dev/random which would block if there aren't enough random numbers in queue. Maybe dns-python should be using /dev/urandom instead (though there might be reasons for not doing so). The mystery is reveale

[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov
Nikolay Dyankov added the comment: Stupid me :)) I must have really missed that. Still I don't understand why the read call takes 10 seconds to complete. -- status: pending -> open ___ Python tracker _

[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > "No code is being executed" Hmm, in dns.entropy module (I found the code there: http://www.dnspython.com/docs/1.7.1/html/dns.entropy-pysrc.html ) line 89 says "pool = EntropyPool()", and the __init__ function opens and reads bytes from /dev/random. This

[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov
New submission from Nikolay Dyankov : The behaviour described below is not always reproduced. The attached test script simply tries to import a couple of dns-python modules, which in turn import other ones. No code is being executed. You expect it to exit for less than a second but it does not.