[QGIS-Developer] Preview job and slow datasources

Even Rouault even.rouault at spatialys.com
Wed Nov 15 07:55:36 PST 2017


On mercredi 15 novembre 2017 16:18:29 CET Matthias Kuhn wrote:
> Hi Even,
> 
> we have shortly discussed this topic in the past and the general
> consensus was, not to offer such an option (which is easy to forget and
> hard to set right without deep knowledge).
> 
> Should we consider a `virtual QgsDataProvider::renderInPreview()`
> method, that can be finetuned by each provider and has a default
> implementation that either uses rendering times as heuristics 

So if the provider of one layer returns false in renderInPreview() that would disable the 
rendering of those layers in the preview images ?

> or just blacklists some known-expensive types?

The provider has not necessarily that knowledge. In my example, if you are very close to the 
server and have high bandwidth, preview jobs wouldn't be a bottleneck.
Or there are cases like JPEG2000 where the CPU speed and number of cores can make a huge 
difference, so the knowledge of the GDAL driver isn't enough.

So I'm wondering if just a per-layer timing logic in 
QgsMapRendererCustomPainterJob::doRender() wouldn't be enough.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171115/f106e312/attachment-0001.html>


More information about the QGIS-Developer mailing list