[gdal-dev] GPKG writing times

Even Rouault even.rouault at spatialys.com
Sun Oct 15 12:29:48 PDT 2017


On dimanche 15 octobre 2017 10:16:35 CEST Jakub Nowosad wrote:
> Hi,
> 
> I'd like to draw your attention to the case of slow (comparing to .shp)
> writing times of GPKG.
> See https://github.com/r-spatial/sf/issues/470 for the details and some
> benchmarks.
> 

Jakub,

A quick search in the code shows that sf doesn't use 
OGRLayer::StartTransaction() / CommitTransaction() to surround calls to 
CreateFeature(). By default, SQLite auto-commits each INSERT, which is slow. 
Doing insertion by batches within a single (or several) transactions helps a 
lot.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list