Bernhard M. Wiedemann added the comment:

traced it down a bit further.
nearly all that time is spent in
import _hashlib
which probably means, it is spent in functions like PyInit__hashlib in 
Modules/_hashopenssl.c

I can see in strace that after loading libssl, libcrypto and libz,
it calls getpid and opens /dev/urandom 8 times
and most of the time is spent in the middle of these:

grep open...dev.uran strace.out
1493970277.542629 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.542847 open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC) 
= 4
1493970277.543370 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.543967 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.592232 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.592518 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.597778 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4
1493970277.598629 open("/dev/urandom", O_RDONLY|O_CLOEXEC) = 4

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30276>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to