decrease memory usage of gpkg a little bit, still need to do a bit better though