Issue25869
Created on 2015-12-15 10:48 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bench_etree_deepcopy.log | serhiy.storchaka, 2015-12-15 10:48 | Benchmark results | ||
| etree_deepcopy.patch | serhiy.storchaka, 2015-12-15 11:21 | review | ||
| etree_deepcopy2.patch | serhiy.storchaka, 2015-12-15 14:15 | review | ||
| Messages (3) | |||
|---|---|---|---|
| msg256455 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-12-15 10:48 | |
According to lxml benchmark [1], deepcopying a tree in ElementTree is about 20 times slower than in lxml. Proposed patch optimizes deepcopying C implementation of ElementTree about 20 times. It is now 5% to 3 times faster than in lxml. [1] http://lxml.de/performance.html |
|||
| msg256459 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-12-15 14:15 | |
Updated patch correctly handles rare cases when different elements share the same attrib dict and when the same Element is occurred on different places in ElementTree (that is no longer a tree, but a directed graph). |
|||
| msg256796 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2015-12-21 10:57 | |
New changeset 090c3e3a648d by Serhiy Storchaka in branch 'default': Issue #25869: Optimized deepcopying ElementTree; it is now 20 times faster. https://hg.python.org/cpython/rev/090c3e3a648d |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:25 | admin | set | github: 70057 |
| 2015-12-21 11:50:59 | serhiy.storchaka | set | status: open -> closed assignee: serhiy.storchaka resolution: fixed stage: patch review -> resolved |
| 2015-12-21 10:57:55 | python-dev | set | nosy:
+ python-dev messages: + msg256796 |
| 2015-12-15 14:15:15 | serhiy.storchaka | set | files:
+ etree_deepcopy2.patch messages: + msg256459 |
| 2015-12-15 11:21:51 | serhiy.storchaka | set | files: + etree_deepcopy.patch |
| 2015-12-15 11:21:29 | serhiy.storchaka | set | files: - etree_deepcopy.patch |
| 2015-12-15 10:48:42 | serhiy.storchaka | set | files: + bench_etree_deepcopy.log |
| 2015-12-15 10:48:07 | serhiy.storchaka | create | |

