[Python-Dev] folding cElementTree behind ElementTree in 3.3 (original) (raw)
Eli Bendersky eliben at gmail.com
Wed Feb 22 03:24:38 CET 2012
- Previous message: [Python-Dev] folding cElementTree behind ElementTree in 3.3
- Next message: [Python-Dev] folding cElementTree behind ElementTree in 3.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm happy to stand up as an example of someone who uses a custom Element class. My specific use case is loading the project Gutenberg database, which is a 210MB XML file. I created a custom Element class which I use for the top-level element (a custom elementfactory passed to TreeBuilder distinguishes between the top-level element and all others). The custom Element class doesn't add children, so it keeps ElementTree from storing all of the elements its seen so far. On a system with 1 GB of RAM, there was no other way to get the file to load.
So, I would be one of those people who would flood in the complaints. :)
Andrew, could you elaborate on your use case? Are you using cElementTree to do the parsing, or ElementTree (the Python implementation). Can you show a short code sample?
Thanks in advance, Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120222/5b97fa59/attachment.html>
- Previous message: [Python-Dev] folding cElementTree behind ElementTree in 3.3
- Next message: [Python-Dev] folding cElementTree behind ElementTree in 3.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]