[Qgis-developer] OGRDataSource life cycle

Victor Chernetsky victor at amigocloud.com
Mon Sep 21 17:03:28 PDT 2015


Hello QGIS gurus!

I am developing a gdal driver for AmigoCloud (www.amigocloud.com)
datasource. This is a REST API to AmigoCloud backend. It’s somewhat close
to CartoDB gdal driver. I have a question about life cycle of the OGRDriver
and OGRDatasource. It seems that every time I pan/zoom map in QGIS it
creates a new instance of OGRDriver/OGRDatasource, Open() it, does it thing
and destructs it. All this process makes it slow. How do I deal with it?
I’d like to keep something in RAM, perhaps cache, is it possible?

I am seeing the destructor of an OGR datasource being constantly called
after each draw. Is there a way to change that behavior? Seems kind of
expensive.

Thanks,
*Victor Chernetsky*


+1 (408) 368-4607
victor at amigocloud.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150921/9fa40504/attachment.html>


More information about the Qgis-developer mailing list