Roald, You should try using transactions as suggested on IRC. This does make a lot of difference for SQLite.
if 'lyr' is the Python object for your SQLite layer : lyr.StartTransaction() ... insert features .... lyr.CommitTransaction() Best regards, Even Le Monday 18 January 2010 06:32:47 Roald de Wit, vous avez écrit : > Hi list, > > Whilst trying to mimic ogr2ogr functionality in Python, I stumbled upon > an issue with writing to SQLite: it works, but it's painfully slow > (minutes instead of seconds). > > The link below points to an example that can be used for reproducing the > behaviour: > http://rdewit.pastebin.com/f73c9b3c0 > > Outputting to ESRI Shapefile, or another CSV is very fast. It's only > SQLite that seems to be slow. > > Any idea what I'm doing wrong? > > Regards, Roald > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
