This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author theller
Recipients
Date 2005-11-11.12:02:42
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 15:44:31adminlinkissue1353872 messages
2007-08-23 15:44:31admincreate