Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid useless canvas redraws #12656

Closed
qgib opened this issue Mar 27, 2010 · 24 comments
Closed

avoid useless canvas redraws #12656

qgib opened this issue Mar 27, 2010 · 24 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering

Comments

@qgib
Copy link
Contributor

qgib commented Mar 27, 2010

Author Name: aperi2007 - (aperi2007 -)
Original Redmine Issue: 2596
Affected QGIS version: master
Redmine category:map_canvas


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.


Related issue(s): #14853 (relates)
Redmine related issue(s): 5087


@qgib
Copy link
Contributor Author

qgib commented Jun 11, 2010

Author Name: Paolo Cavallini (@pcav)


Does enabling cache improve this significantly?

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2010

Author Name: aperi2007 - (aperi2007 -)


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?

@qgib
Copy link
Contributor Author

qgib commented Nov 13, 2010

Author Name: Volker Fröhlich (@volter)


Can't see that happen at all using Trunk on Linux -- with or without rendering cache.

Can you test with Trunk?

@qgib
Copy link
Contributor Author

qgib commented Nov 14, 2010

Author Name: Giovanni Manghi (@gioman)


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?

@qgib
Copy link
Contributor Author

qgib commented Nov 14, 2010

Author Name: Giovanni Manghi (@gioman)


Now I can see even better:

have a look at the following screencast:

http://www.faunalia.pt/downlaods/redrawns.mpeg

the vectors seems to be redrawn TWICE when toggling editing and it is even redrawn when clicking "Ok" or "apply" in QGIS menus.

@qgib
Copy link
Contributor Author

qgib commented Nov 14, 2010

Author Name: Giovanni Manghi (@gioman)


sorry wrong link

http://www.faunalia.pt/downloads/redrawns.mpeg

@qgib
Copy link
Contributor Author

qgib commented Nov 14, 2010

Author Name: Volker Fröhlich (@volter)


Thank you, can see it now.

@qgib
Copy link
Contributor Author

qgib commented Jul 25, 2011

Author Name: Paolo Cavallini (@pcav)


  • tracker_id was changed from 1 to 4
  • assigned_to_id removed nobody
  • start_date was configured as 2011-07-25
  • pull_request_patch_supplied was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Sep 25, 2011

Author Name: Giovanni Manghi (@gioman)


Another useless redraw is when clicking "OK" after having clicked on "APPLY", for example in vector or raster properties.


  • fixed_version_id removed Version 1.7.0
  • subject was changed from One draw too much on switch off to avoid useless canvas redraws
  • priority_id was changed from Low to Normal

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2011

Author Name: Giovanni Manghi (@gioman)


another useless redraw:

when the identify window is set to be opened docked but it is not (yet) visible: picking the identify tool (or any other one) causes the canvas to be refreshed.

@qgib
Copy link
Contributor Author

qgib commented Oct 15, 2011

Author Name: Giovanni Manghi (@gioman)


another useless redraw, see #12412

@qgib
Copy link
Contributor Author

qgib commented Dec 16, 2011

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id was configured as Version 1.7.4

@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2011

Author Name: Giovanni Manghi (@gioman)


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.

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Giovanni Manghi (@gioman)


Another useless redraws (from #14644):

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.


  • version was configured as master
  • crashes_corrupts_data was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Jan 11, 2012

Author Name: Giovanni Manghi (@gioman)


see also #13487

@qgib
Copy link
Contributor Author

qgib commented Feb 24, 2012

Author Name: Aren Cambre (Aren Cambre)


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.

(from #14853)

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2012

Author Name: Giovanni Manghi (@gioman)


  • tracker_id was changed from 4 to 1

@qgib
Copy link
Contributor Author

qgib commented Apr 16, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.7.4 to Version 1.8.0

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.8.0 to Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2012

Author Name: Regis Haubourg (@haubourg)


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 ;-)
Régis

@qgib
Copy link
Contributor Author

qgib commented Jan 30, 2014

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 2.0.0 to Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented Jul 24, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Can this topic be closed since MT rendering is implemented?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jul 24, 2014

Author Name: Giovanni Manghi (@gioman)


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:

#18853
#18242


  • operating_system was changed from All to
  • status_info was changed from 1 to

@qgib
Copy link
Contributor Author

qgib commented Oct 11, 2014

Author Name: Giovanni Manghi (@gioman)


closing in favor of tickets for specific cases.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to duplicate

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering labels May 24, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering
Projects
None yet
Development

No branches or pull requests

1 participant