[gdal-dev] Optimizing access to shapefiles

Martin Dobias wonder.sk at gmail.com
Fri Jul 23 08:31:52 EDT 2010


On Fri, Jul 23, 2010 at 12:47 PM, Yevgen Antymyrov
<yevgen.antymyrov at and.com> wrote:
> On 07/19/2010 02:08 PM, Martin Dobias wrote:
>>
>> Hi,
>>
>> in order to speed up rendering in QGIS as a part of my GSoC project,
>> I've took some time to profile reading of shapefiles in OGR. From the
>> results I'd like to suggest some changes that significantly contribute
>> to the speed of data retrieval. On a test shapefile of a road network
>> (about 100 thousand polylines), I have seen 3-4 times faster retrieval
>> when I've implemented the following changes:
>>
>> [...]
>
> I have a couple of questions.
>
> Comparing to other Shapefile tools like Arc* and TatukGIS, the OGR-based
> tool Quantum GIS has really bad performance because it just does too much.
> Do you think your solution can be applied to Qgis? I mean when displaying
> geometry, it can call SetDesiredFields() with all 0s. And only when user
> opens Attribute Table, Qgis can re-get all/selected fields. Will this be
> possible with your patch?

This is exactly my intent. Vector data providers in QGIS always
receive a list of fields that are needed, however until now OGR data
provider couldn't make use of it, because currently there's no way in
OGR to limit what fields should be fetched. Knowing which fields can
be ignored allows us to save a lot of unnecessary work.

Regards
Martin


More information about the gdal-dev mailing list