[Geopackage] Geopackage on a shared network drive

Even Rouault even.rouault at spatialys.com
Fri Sep 30 15:52:23 EDT 2016


Le vendredi 30 septembre 2016 00:44:45, Árni Geirsson via Geopackage a écrit :
> Dear Geopackage developers!
> I look forward to the day when Geopackage replaces the old shapefiles and I
> thank you for your efforts. As a user in a small team that uses QGIS and
> shares data on a NAS box, basically a Samba server for network shares, I
> notice that Geopackage data loads very slowly, much more slowly than a
> shapefile stored in exactly the same shared folder. I have noticed this
> with Spatialite, too, and suspect that the problem lies with Sqlite and
> some problem it has with the networking protocol. Since Geopackage is
> intended (as I understand) as a storage and exchange format for geodata,
> rather than a general purpose database format like Spatialite, I was hoping
> that this problem could be overcome and that the Geopackage data would load
> as fast as the shapefile data from the network share. When the Geopackage
> and shapefile data are both on a local drive, I see no difference in the
> loading speed.
> 
> Do you think this will be solved?
> 

QGIS tweaks GDAL/OGR to use a large buffer size to speed up network access to 
shapefiles (or any format that uses the GDAL I/O layer, which is called "VSI").

If you look at the qgis.bat in c:\osgeo4w\bin, you will see :
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000

But by default, the OGR GPKG driver uses SQLite own I/O layer, which probably 
does access with a granualrity of a SQLite page size (4KBytes). You could 
tried to define the 
SQLITE_USE_OGR_VFS=YES environmenet variable, restart QGIS and then SQLite 
should use the GDAL/OGR I/O layer and hopefully benefit from the buffering. I 
have not tried that, so not completely sure if it will improve things.

Even

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


More information about the Geopackage mailing list