Oliver Tonnhofer <o...@omniscale.de> wrote:

> Thanks for sharing your code! iterparse is slower in you case, because
> you're using the Python version of ElementTree and not cElementTree.
> 
> You need to change the import:
> 
> from xml.etree import cElementTree as ElementTree   # fast xml parser module

It change everything !

On the 30 MB file, xml.sax is now the slowest, even ET (DOM) is fastest.

I update the code :
https://github.com/padorange/osm-xml-tests

-- 
Pierre-Alain Dorange
OSM experiences : <http://www.leretourdelautruche.com/map/>


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to