[issue25873] Faster ElementTree iterating

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a5d5268afd5 by Serhiy Storchaka in branch 'default': Issue #25873: Optimized iterating ElementTree. https://hg.python.org/cpython/rev/5a5d5268afd5 -- nosy: +python-dev ___ Python tracker

[issue25873] Faster ElementTree iterating

2015-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25873] Faster ElementTree iterating

2015-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Martin. I have opened a separate issue25902 for refcount bugs in iteration. Its patch is purposed for all versions, while this issue is for developer version only. -- ___ Python tracker

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch refactors and optimize the code for iterating ElementTree. Refactoring and minor optimization makes the code about 30 lines smaller and 2-3% faster. Using a continuous array instead of linked list makes the code up to 40% faster (lxml

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Martin Panter
Martin Panter added the comment: Looks technically correct as far as my knowledge of the malloc routines goes. What was the problem with references that you fixed? Maybe with parent_stack_push_new() failure? The main reference counting bug that sticks out to me is with the text and tail

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file41323/etree_iter2.patch ___ Python tracker ___

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file41324/etree_iter2.patch ___ Python tracker ___

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Martin. I missed this case. Following patch fixes it. Other bugs look similar. They presumably can be triggered when remove the element itself during executing the __next__() method. I have no a reproducer though. I don't know wherever it is

[issue25873] Faster ElementTree iterating

2015-12-15 Thread Martin Panter
Martin Panter added the comment: The new changes look good. I see these kind of reference counting bugs as fairly low priority. I suspect there are plenty more in this module, at least Issue 24103 and Issue 24104. -- ___ Python tracker