Message49009
Logged In: YES
user_id=11105
Here is a description of the changes in the patch:
Modulefinder's scan_code method did call ord() on each
character of the co.co_code string, that took the most time,
and it built the argument (again with ord() calls) of each
bytecode that had one, even if it was never used.
The patch changes the code to
- work on the characters of the co.co_code string, avoiding
the calls to ord() altogether
- create the bytecodes argument only when needed,
- create the bytecode with struct.pack which is faster.
I did not stop there, so other changes were that the objects
that scan_code needs most are passed as default arguments to
the functions instead of looking them up in the global
namespace.
This patch will probably be in the next py2exe release, so
it will undergo some testing.
I would appreciate comments on the patch.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:44:31 | admin | link | issue1353872 messages |
2007-08-23 15:44:31 | admin | create | |
|