[Qgis-developer] Geospackage Slow in QGIS
Stefan Keller
sfkeller at gmail.com
Sat May 17 01:46:39 PDT 2014
So it's this code fragment?
419 /* Requirement 6: The SQLite PRAGMA integrity_check SQL command
SHALL return â??okâ? */
420 /* http://opengis.github.io/geopackage/#_file_integrity */
421 if( strncmp(pszFilename, "/vsicurl/", strlen("/vsicurl/")) != 0 &&
422 OGRERR_NONE != PragmaCheck("integrity_check", "ok", 1) )
Looks strange to me why a single file check woold be the bottlenet since
this should be a single call.
I would have expected that some repeated calls (like reading
objects/records and checking SRID or data types) would be the bottleneck
since SQlite is not performant when used with PRAGMA checks. This would be
a check one could disable with a parameter.
--S.
2014-05-17 10:29 GMT+02:00 Jeremy Palmer <JPalmer at linz.govt.nz>:
> HI Stefan,
>
> Call from QGIS is here:
> https://github.com/qgis/QGIS/blob/master/src/providers/ogr/qgsogrfeatureiterator.cpp#L45
>
> GDAL code is here:
>
>
> http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L421
>
> My profiler says all the time is in OGRGeoPackageDataSource::Open.
>
> Also a simple check via the command line for the given database:
>
> qlite3 test_parcels.gpkg
> sqlite> .timer ON
> sqlite> PRAGMA integrity_check;
> ok
> CPU Time: user 3.384211 sys 0.756047
>
> Cheers,
> Jeremy
> ________________________________________
> From: Stefan Keller [sfkeller at gmail.com]
> Sent: Saturday, 17 May 2014 8:20 p.m.
> To: Jeremy Palmer
> Cc: qgis-developer at lists.osgeo.org
> Subject: Re: [Qgis-developer] Geospackage Slow in QGIS
>
> Hi Jeremy
>
> Is this PRAGMA integrity_check really the bottle neck?
> Is it an integrity check on a data type (e.g. integer - its probably
> actually an integrity check on SRID)?
> Can you point to the code?
>
> Yours, Stefan
>
>
>
> 2014-05-17 9:32 GMT+02:00 Jeremy Palmer <JPalmer at linz.govt.nz<mailto:
> JPalmer at linz.govt.nz>>:
> I've just been using the new implementation of Geopackage in QGIS :)
> However each map render or feature info is very slow for large database
> files - even with the new GDAL/OGR Geopackage spatial index support. Each
> time QGIS renders a new map view or executes a feature info it re-opens the
> Geopackage file in QgsOgrFeatureIterator via OGROpen, and the Geopackage
> driver open method runs PRAGMA integrity_check which is very slow (4 secs
> with my 2GB test file). This integrity check is actually a Geopackage
> requirement.
>
> How can this be fixed? At the in QGIS or GDAL/OGR level?
>
> Cheers,
> Jeremy
>
> This message contains information, which may be in confidence and may be
> subject to legal privilege. If you are not the intended recipient, you must
> not peruse, use, disseminate, distribute or copy this message. If you have
> received this message in error, please notify us immediately (Phone 0800
> 665 463 or info at linz.govt.nz<mailto:info at linz.govt.nz>) and destroy the
> original message. LINZ accepts no responsibility for changes to this email,
> or for any attachments, after its transmission from LINZ. Thank You.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org<mailto:Qgis-developer at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140517/76fe6c99/attachment-0001.html>
More information about the Qgis-developer
mailing list