I'm doing a bit of performance tuning in a python application that makes heavy use of numpy and scipy. When using cProfile to find "hot" functions, I'm seeing a number of entries like:
427784 49.798 0.000 133.904 0.000 .../ve/lib/python2.7/site-packages/scipy/misc/doccer.py:12(docformat)
If I'm reading this correctly, doc formatting in the doccer.py module has been called 427,000 or so times, constituting about 49 seconds of the total runtime (even though each individual call is pretty fast). That's a pretty significant fraction of the total runtime!
I'm having a hard time finding more about doccer / docformatting (google always wants to substitute docker or soccer instead of doccer). Is there a way to disable it? Is it really as bad as it seems? Thanks!
Coming way too late to this question, I'm guessing that somewhere in the application, it's using scipy "frozen" distributions, e.g. stats.norm(0, 1).rvs(size=10)
instead of stats.norm.rvs(0, 1, size=10)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With