[OSM-dev] Another benchmark

Pierre-Alain Dorange pdorange at mac.com
Fri Apr 29 16:33:16 BST 2011


Oliver Tonnhofer <olt at 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/>




More information about the dev mailing list