Proposal: have install_product detect __init__.pyo too
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? Richard
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#SECTION00812000000000000000... 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
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?
No, there shouldn't be problems. I've updated Application.py to do the right thing when there is only a .pyo file in the product directory for 2.5. Thanks! Brian Lloyd brian@zope.com Software Engineer 540.361.1716 Zope Corporation http://www.zope.com
participants (3)
-
Brian Lloyd -
Evan Simpson -
Richard Jones