On 4/28/11 2:58 PM, Oliver Tonnhofer wrote:

On 28.04.2011, at 14:46, Serge Wroclawski wrote:

On Thu, Apr 28, 2011 at 8:30 AM, Oliver Tonnhofer<[email protected]>  wrote:

If you are using Python, you should use iterparse from the ElementTree API, it 
is much nicer and faster.

Faster than SAX? I'm not so sure. SAX calls the C directly.


Here is a benchmark: http://effbot.org/zone/celementtree.htm

Regards,
Oliver

Interesting, this totally uproots my firm conviction that SAX parsing is always more time- and memory-efficient than tree/DOM-based parsing.

The article is 6 years old, do the benchmarks still hold in your experience?

--
Martijn van Exel
Senior Researcher
-------------------------------------
Geodan S&R
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
Tel: +31 (0)20 - 5711 318
Fax: +31 (0)20 - 5711 333
-------------------------------------
E-mail: [email protected]
Website: www.geodan.nl
KvK-nummer: 33 247475
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------


_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to