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 nedds
Recipients collinwinter, nedds
Date 2008-06-27.18:19:00
SpamBayes Score 0.0050473707
Marked as misclassified No
Message-id <1214590746.67.0.566923914778.issue3218@psf.upfronthosting.co.za>
In-reply-to
Content
This is an optimization in pytree.py specifically for the bare_name
pattern from fix_imports.py. It also has the isinstance change I
previously suggested piggybacked onto it. Because the bare_name pattern
is so massive (764 nodes!), it is very slow to call _recursive_matches
on it. This fix has a special bare_name_matches fix that uses an
iterative matching solution specifically tailored to the bare_name
pattern. From preliminary testing, it appears to be roughly 25-30%
faster than the previous version of 2to3. If I uncomment the fix_imports
test, it fails 6 of them, but they are the same ones failed by the
current version of 2to3 and it fails them in the same way, so I think it
works. As with my previous isinstance chance, a one line change to
test_pytree is required.
History
Date User Action Args
2008-06-27 18:19:07neddssetspambayes_score: 0.00504737 -> 0.0050473707
recipients: + nedds, collinwinter
2008-06-27 18:19:07neddssetspambayes_score: 0.00504737 -> 0.00504737
messageid: <1214590746.67.0.566923914778.issue3218@psf.upfronthosting.co.za>
2008-06-27 18:19:05neddslinkissue3218 messages
2008-06-27 18:19:05neddscreate