[issue2431] 2to3 is rather slow

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I think we can safely say this has been fixed especially with regards to fix_imports. Thanks to Nick Edds! It only takes me about 3 seconds to process the example file. -- nosy: +benjamin.peterson resolution: -> fixed status: open

[issue2431] 2to3 is rather slow

2008-04-23 Thread David Wolever
David Wolever <[EMAIL PROTECTED]> added the comment: I've cleaned up and applied the patch in r62470. As Collin suggested, I'm leaving the ticket open to use in the future. __ Tracker <[EMAIL PROTECTED]> _

[issue2431] 2to3 is rather slow

2008-03-25 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: The updated version of the patch passes the tests and yields a 19-20% speed increase in the running time of test_all_fixers and the time taken for 2to3 to translate itself. I've sent David some comments on the patch, and once it's cleaned up so

[issue2431] 2to3 is rather slow

2008-03-25 Thread David Wolever
David Wolever <[EMAIL PROTECTED]> added the comment: Ah, yea -- in my rush to catch my train I must have neglected to look at the _results_ of running test.py... I have updated the patch so the fixers will work. Added file: http://bugs.python.org/file9853/fixer_head_node_lookup_2.diff ___

[issue2431] 2to3 is rather slow

2008-03-25 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: With the patch applied, all tests in test_fixers fail. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-

[issue2431] 2to3 is rather slow

2008-03-20 Thread David Wolever
David Wolever <[EMAIL PROTECTED]> added the comment: A patch so that, on each node, only fixers who's head node could match this node are executed. It's still hacky and ugly, but a decent POC. -- keywords: +patch Added file: http://bugs.python.org/file9791/fixer_head_node_lookup.diff

[issue2431] 2to3 is rather slow

2008-03-20 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Keep in mind that not all fixers use PATTERN, for example fix_ne. __ Tracker <[EMAIL PROTECTED]> __

[issue2431] 2to3 is rather slow

2008-03-20 Thread David Wolever
David Wolever <[EMAIL PROTECTED]> added the comment: Martin and I talked about this, and I'm going to try loading the first node of each tree generated by the PATTERNs into a dictionary, then when the tree is walked, only fixers which could potentially match the current node are executed. ---

[issue2431] 2to3 is rather slow

2008-03-20 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Yes, and each new fixer makes it slower. The biggest problem is the pattern matching system, which tends to take 99% of the running time. I've talked to several people who are interested in optimizing 2to3 as a GSoC project, though, so I antici

[issue2431] 2to3 is rather slow

2008-03-19 Thread David Wolever
New submission from David Wolever <[EMAIL PROTECTED]>: It takes me 10 seconds to run 2to3 on the example file. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 64152 nosy: David Wolever, collinwinter severity: normal status: open title: 2to3 is rather slo