Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue25869

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Faster ElementTree deepcopying
Type:performanceStage:resolved
Components:Extension ModulesVersions:Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: brett.cannon, python-dev, scoder, serhiy.storchaka
Priority:normalKeywords:patch

Created on2015-12-15 10:48 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
bench_etree_deepcopy.logserhiy.storchaka,2015-12-15 10:48Benchmark results
etree_deepcopy.patchserhiy.storchaka,2015-12-15 11:21review
etree_deepcopy2.patchserhiy.storchaka,2015-12-15 14:15review
Messages (3)
msg256455 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)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)*(Python committer)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)(Python triager)Date: 2015-12-21 10:57
New changeset090c3e3a648d 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
DateUserActionArgs
2022-04-11 14:58:25adminsetgithub: 70057
2015-12-21 11:50:59serhiy.storchakasetstatus: open -> closed
assignee:serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2015-12-21 10:57:55python-devsetnosy: +python-dev
messages: +msg256796
2015-12-15 14:15:15serhiy.storchakasetfiles: +etree_deepcopy2.patch

messages: +msg256459
2015-12-15 11:21:51serhiy.storchakasetfiles: +etree_deepcopy.patch
2015-12-15 11:21:29serhiy.storchakasetfiles: -etree_deepcopy.patch
2015-12-15 10:48:42serhiy.storchakasetfiles: +bench_etree_deepcopy.log
2015-12-15 10:48:07serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp