<div dir="ltr">Hi list,<div><br></div><div>I'm trying to understand some unexpected behavior I'm seeing while profiling bulk attribute changes in a GPKG file.</div><div><br></div><div>First, I start a transaction on the layer using OGR_L_StartTransaction. This is successful.</div><div>I then make many calls to OGR_L_SetFeature, changing different features, before finalizing the transaction with OGR_L_CommitTransaction.</div><div><br></div><div>Now, when profiling this code, I'm seeing that OGRGeoPackageTableLayer::ISetFeature(OGRFeature*) is taking a very large chunk of time. This is due to the call to sqlite3_step at <a href="https://github.com/OSGeo/gdal/blob/2b94d7a274bfeb881a176016de932ba8acd1b79a/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp#L3134">https://github.com/OSGeo/gdal/blob/2b94d7a274bfeb881a176016de932ba8acd1b79a/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp#L3134</a> triggering a call to rtreeUpdate within sqlite3. </div><div><br></div><div>I'm confused as to why this is happening. If I'm in a transaction, shouldn't the index update be deferred until the transaction is committed? Why would it be updating after every individual update?</div><div><br></div><div>Hoping someone can explain what I'm missing here...</div><div>Nyall</div></div>