You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pulldom cannot handle xml file with large external entity properly #47067
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2008-05-11.13:32:17.541>labels= ['expert-XML', '3.8', 'performance']
title='pulldom cannot handle xml file with large external entity properly'updated_at=<Date2019-05-28.08:47:13.739>user='https://bugs.python.org/hanselda'
when use xml.dom.pulldom module to parse a large xml file, if all the
information is saved in one xml file, the module can handle it in the
following way without construction the whole DOM:
events=xml.dom.pulldom.parse('file.xml')
for (event, node) inevents:
process(event, node)
But if 'file.xml' contains some large external entities, for example:
<!ENTITY file_external SYSTEM "others.xml">
<body>&file_external;</body>
Then using the same python snippet above leads to enormous memory
usage. I did not perform a concrete benchmark, in one case a 3M
external xml file drained about 1 GB memory. I think in this case it
might be the whole DOM structure is constructed.
Activity
hanselda commentedon May 11, 2008
when use xml.dom.pulldom module to parse a large xml file, if all the
information is saved in one xml file, the module can handle it in the
following way without construction the whole DOM:
But if 'file.xml' contains some large external entities, for example:
<!ENTITY file_external SYSTEM "others.xml">
<body>&file_external;</body>
Then using the same python snippet above leads to enormous memory
usage. I did not perform a concrete benchmark, in one case a 3M
external xml file drained about 1 GB memory. I think in this case it
might be the whole DOM structure is constructed.
ashm-dev commentedon Nov 13, 2025
Ping. Is this issue still relevant?