RandomPool initialization is slow on Windows
Bug #248522 reported by
A.M. Kuchling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Won't Fix
|
Undecided
|
John A Meinel |
Bug Description
See discussion in http://
Excerpt: In RandomPool.
However, time.time() on windows only has a resolution of ~15ms. So
getting 100 new ticks takes... 15ms * 100 = 1.5s (no surprise there).
It turns out that on *windows* you should be using time.clock() which
uses a high resolution timer. (On Linux, time.clock() measures CPU time,
which isn't good for this particular use.)
Related branches
To post a comment you must log in.
I just put together a patch for this. I don't know how it fits with the overall code base, but at least it is consistent within randompool.py