Bug report #2596
avoid useless canvas redraws
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||duplicate|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||12656|
Starting with a layer switch-on, if the layer is switch-off.
The canvas is redraw one time again with the layer switch-on before draw the canvas without the layer.
This is time consuming action if the layer switched-off is a big archive with a large extent.
#2 Updated by aperi2007 - over 9 years ago
I do some tests.
It happened even with shapefile.
If I checked the "use cache render" this don't happened.
It don't happened even if I deselect the "use cache render", but set
the number of features to draw before updating the display to zero (0).
In effect it seem happened only when this settings is set to some number other than zero.
Infact I usually use as settings 3000 or 5000 features because I have postres with
some table very big (1.000.000 features and so on).
And use the 0 setting is unacceptable because it mean wait some minutes before to see something (to full-extent).
I surely prefer set to 5000 features before drawing to have a feedback of progress of display-ing.
But this double redrawing is quite boring.
Now I test better with the use of caching.
Replying to [comment:1 pcav]:
Does enabling cache improve this significantly?
#4 Updated by Giovanni Manghi about 9 years ago
I'm able to see what Andrea is saying.
*) With render caching enabled, then the "number of features to be drawn before updating the display" does not work anymore. If you refresh the map the vector will be rendered as if the option is set to "0", so I guess that it would be needed to disabled this option when the render caching is enabled.
*) With the render caching is disabled and you choose something different from "0" in "number of features to be drawn before updating the display" (and you are using a vector with many features, I'm testing myself a 50000 polygons vector) then the problem is evident.
Add another (small) vector and then start enabling/disabling it in the TOC, the big vector is continuously redrawn at each click... very annoying.
In general without render caching enabled (and "number of features to be drawn before updating the display" set to 0), enabling/disabling a vector in a project where there are many others vectors, or a few big ones, it takes really a lot.
I'm on trunk/ubuntu 10,04 and with the render caching enabled, on the contrary, it works really smooth.
It the options enabled by default?
#9 Updated by Giovanni Manghi over 8 years ago
- Target version deleted (
- Subject changed from One draw too much on switch off to avoid useless canvas redraws
- Priority changed from Low to Normal
Another useless redraw is when clicking "OK" after having clicked on "APPLY", for example in vector or raster properties.
#13 Updated by Giovanni Manghi about 8 years ago
Another huge waste of time:
in a project add a group of layers plus other layers and some kind of overlay. I tested with a bunch of PostGIS layers, some of them grouped and a WMS overlay. When removing the group it seems that the canvas is redrawn as many times as the number of layers in the group being removed.
#14 Updated by Giovanni Manghi about 8 years ago
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to No
Another useless redraws (from #4789):
If I open the Add PostGIS layer dialog and do nothing, just hit Close, the whole view re-renders. This causes needless CPU usage and delays when no re-render was needed.
#16 Updated by Aren Cambre almost 8 years ago
If I do anything that causes the Identify Results dock to appear, such as clicking on the Identify Features or Select single feature buttons, the entire canvas redraws. Seems like a pointless redraw since the dock, in my case, does not change the canvas dimensions when it opens; it just encroaches on the Layers dock.
If I close the Identify Results dock, there's no redraw, but it happens again if I click on one of those buttons.
#20 Updated by Regis Haubourg about 7 years ago
Another useless redraw: Data is redrawn twice if "option/rendering/feature of feature to draw before updating the display " is set to something different than 0. Not good since this option is really nice to let user be patient for huge datasets, he has to be twice more patient ;-)
#23 Updated by Giovanni Manghi over 5 years ago
- Operating System deleted (
- Status info deleted (
Matthias Kuhn wrote:
Can this topic be closed since MT rendering is implemented?
I see your point, because of MTR the canvas does not block anymore, then a canvas redraw is harmless. I would say that I agree, but useless redraws can still hurt when layers are big (millions of features) and/or projects complex.
I guess that this ticket was too general from the beginning, and we should close this in favor of keeping specific ones like: