View Single Post
Old 01-06-2020, 09:33 AM   #95
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Sorry, I'm stupid. I used /usr/bin/python3 with "import init_calibre" (easier than following absolute paths to where I installed each version of calibre-debug), but it turns out I was missing /home/eschwartz/.local/lib/python3.8/site-packages/init_calibre.py, so it ended up using the stable tagged version installed in /usr instead.

I guess that's the cost of having multiple copies of calibre installed I have a python2 build and a python3 build to test for distribution packaging, and another set of python2 and python3 builds which I usually use actively.

...

To be clear, after fixing my install, my test EPUB now averages 0.3 on python3, and 0.5 on python2, and your calibre-debug line (on a downloaded project gutenberg /tmp/1184-0.txt) now averages 0.093600690001 on python2 and 0.08859269299864536 on python3, so that's consistently a bit better on python3.

Linux performance doesn't seem to care significantly whether python2 or python3 is used, but the current git master makes both equally faster (your calibre-debug line took 409.37419593899904 when running it on python3 with the old O(n^2) code! and 0.08 with the new code).

Last edited by eschwartz; 01-06-2020 at 09:37 AM.
eschwartz is offline   Reply With Quote