Differences between revisions 2 and 3
Revision 2 as of 2004-02-06 14:00:40
Size: 446
Editor: cache1-1-ffm-vpn
Comment: fix markup
Revision 3 as of 2006-08-07 03:19:50
Size: 764
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
py2exe-ing larger projekts take some time for byte compilation at all. py2exe-ing larger projects take some time for byte compilation.
Line 4: Line 4:
= Idea =
Maybe [http://psyco.sourceforge.net psyco] will help?
= Solution =
[http://psyco.sourceforge.net psyco] can help both the compilation, and the final program.
Line 8: Line 8:
= doing it = = Example =
Line 10: Line 10:
at the top of setup.py I inserted To speed up Py2Exe insert at the top of setup.py:
Line 15: Line 15:
psyco.log()
Line 19: Line 18:
and it feels faster. No time to benchmark, yet and it will compile 2-20 times faster (depending on your code). This can also improve your programs running speed if you insert it in top of the main module.

To generate a log of the process (there is no need to with Py2Exe, but you might want to for your code) simply insert the line "psyco.log()" in-between the two others.

Situation

py2exe-ing larger projects take some time for byte compilation.

Solution

[http://psyco.sourceforge.net psyco] can help both the compilation, and the final program. as Armin Rigo writes... "Psyco is a Python extension module which can massively speed up the execution of any Python code."

Example

To speed up Py2Exe insert at the top of setup.py:

   1 import psyco
   2 psyco.full()

and it will compile 2-20 times faster (depending on your code). This can also improve your programs running speed if you insert it in top of the main module.

To generate a log of the process (there is no need to with Py2Exe, but you might want to for your code) simply insert the line "psyco.log()" in-between the two others.

SpeedUp (last edited 2008-07-08 11:27:43 by localhost)