[QGIS-Developer] QGIS WMS provider firing too many requests !?

Nyall Dawson nyall.dawson at gmail.com
Thu Feb 25 14:48:09 PST 2021


On Fri, 26 Feb 2021 at 05:25, Richard Duivenvoorde <rdmailings at duif.net> wrote:
>
> On 2/13/21 8:01 PM, pathmapper wrote:
> > Hi,
> >
> > here's a related thread (i.e. xyz tiles, but I guess it's also valid vor wms):
> > https://github.com/qgis/QGIS/issues/34813
> >
> > Some quotes:
> > "QGIS renders the surrounding areas in a background job to make subsequent pan actions faster. Therefore it sends more tile requests than necessary for the current map extent."
> >
> > "Btw, we now have the code in place to fine-tune prefetching behavior for all raster layers on a per-layer basis, for now I just blacklisted osm tiles."
> >
> > It sounds like the plan is to make the prefetching behavior configurable via QGIS settings.
>
> See https://github.com/qgis/QGIS/pull/41832 to prevent prefetching for true WMS's...
>
> Now I like to have some input indeed making prefetching behaviour more configurable:
>
> - where to put a checkbox/setting about prefetching tiles (global raster, or per wms service or just global, or a hidden setting)?
> - what to make default (with or without prefetching...?)
>
> My first idea:
> - add a checkbox "Prefetch surrounding WMS(T) images" in the WMS/WMTS Connection dialog in the 'WMS/WMTS Options' section; default FALSE (unless see below)
> - In General Options / Network / Cache Settings add a  tab or just a checkbox with "Default prefetch WMS(T) images" (defaulting to FALSE, but if enabled the above mentioned checkbox will always be enabled too)
> - also make this an option in the provider uri


Question: Do we REALLY need an option for this? I think the behavior
after your recent PR is correct, in that we ALWAYS skip the prefetch
for WMS. I don't think there's a strong enough use case that someone
would want to enable this to warrant a new option (and the
corresponding UI complexity and code maintainence burden that comes
with a configurable option).

Nyall


More information about the QGIS-Developer mailing list