[Zope-dev] Proposal: have install_product detect __init__.pyo too

Evan Simpson evan@4-am.com
Wed, 10 Oct 2001 21:28:01 -0400


Richard Jones wrote:

> I'd like to run python in its optimised mode (to try to squeeze that extra 
> 1-5% of performance out of it ;). The only real barrier to doing this is that 
> install_product doesn't check for __init__.pyo (just .py and .pyc).
> 
> Would there be serious problems if it was modified to detect the .pyo as well?


See 
http://www.python.org/doc/current/tut/node8.html#SECTION008120000000000000000


It explains that the only performance advantage is a slight increase in 
loading speed, not at runtime.  Also, Python should use your .pyo file 
even if __init__.py exists.  It's probably not worth it, tho.

Cheers,

Evan @ Zope