Bug report #21472

Too many canvas refreshes imacts feature editing

Added by Alexey T over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Tools
Affected QGIS version:3.6.0 Regression?:No
Operating System:win7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:29289

Description

I have a heavy project. Redrawing it takes near a second or a two.

Canvas refresh happens every time when
1. selecting a feature
2. deselecting a feature
3. Toggling editing mode
4. moving feature, or feature vertex

It is impossible to edit something in this case.

QGIS 2.18 doesn't behave like this.

The video, showing the difference in 2.18 and 3.6 is here
https://yadi.sk/d/oGakaJc77ilkNQ

History

#1 Updated by Nyall Dawson over 5 years ago

  • Status changed from Open to Feedback

Please check the label settings for the layer being edited in both versions - I suspect the difference is due to different label settings in the 3.x project causing a complete redraw.

#2 Updated by Alexey T over 5 years ago

First, QGIS redraws all layers, not only the layer being edited.
Second, the projects and label settings are identical.

#3 Updated by Nyall Dawson over 5 years ago

I cannot reproduce. There is a specific setting in your project which is causing this to happen, or possibly it's due to an installed plugin changing the behaviour.

#4 Updated by Alexey T over 5 years ago

No and no. No plugins. Just a very large project. Once again a have to explain this as in #22189. Download sample dem data from that issue and test.

#5 Updated by Alexey T over 5 years ago

Test this roject please.
https://yadi.sk/d/YeIFSsxmVghSQg

Select "line" layer. Then use vertex tool to edit a feature.
QGIS 3 will refresh canvas after each change. As this is slow, it is impossible to edit features comfortably.
QGIS 2.18 will refresh canvas only if really needed.

#6 Updated by Giovanni Manghi over 5 years ago

Alexey T wrote:

Test this roject please.
https://yadi.sk/d/YeIFSsxmVghSQg

Select "line" layer. Then use vertex tool to edit a feature.
QGIS 3 will refresh canvas after each change. As this is slow, it is impossible to edit features comfortably.
QGIS 2.18 will refresh canvas only if really needed.

just tested your project on 3.6, select the "line" layer, toggled editing and made some node/segment changes and/or selection. No refreshes.

#7 Updated by Giovanni Manghi over 5 years ago

  • Category changed from GUI to Map Tools

#8 Updated by Alexey T over 5 years ago

Strange. Cannot reproduce it too now. May be I've changed some QGIS settings. Will investigane

#9 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Closed
  • Resolution set to invalid

Ask to reopen if you find a/the real problem.

#10 Updated by Alexey T over 5 years ago

I think this should be reopened.

"Use render caching if possible to speed up redraws" should be enabled in QGIS render settings.

Check this video please.
https://yadi.sk/d/NOzf9wBovWelHg

Add a label to "line" layer. Add label to dem layer. Labels may be empty
Then, editing "line" layer couses full canvas redraw, which is slow.

#11 Updated by Giovanni Manghi over 5 years ago

Alexey T wrote:

I think this should be reopened.

"Use render caching if possible to speed up redraws" should be enabled in QGIS render settings.

Check this video please.
https://yadi.sk/d/NOzf9wBovWelHg

Add a label to "line" layer. Add label to dem layer. Labels may be empty
Then, editing "line" layer couses full canvas redraw, which is slow.

with labels on (even empty) I see a redraw, also on 2.18 and regardless of the "Use render caching if possible to speed up redraws". This is also your observation? if yes I guess that this is how it works (not sure 100%) so this should be possible be filed as a feature request/improvement (but I have a vague idea that I filed a similar ticket many years ago and the answer was that it wasn't possible to improve much this area when labels are on... but again my memory could fail me).

#12 Updated by Alexey T over 5 years ago

As labels are always drawn on top of all rasters and vectors, I think QGIS might redraw labels only, when editing features, leaving already rendered vectors and rasters intact.
May be label reposition somehow breaks caching?

#13 Updated by Giovanni Manghi over 5 years ago

Alexey T wrote:

As labels are always drawn on top of all rasters and vectors, I think QGIS might redraw labels only, when editing features, leaving already rendered vectors and rasters intact.
May be label reposition somehow breaks caching?

I'll leave the answer to a core developer.

#14 Updated by Alexey T over 5 years ago

Shouldn't this bug be reopened?

#15 Updated by Giovanni Manghi over 5 years ago

Alexey T wrote:

Shouldn't this bug be reopened?

#10441

Also available in: Atom PDF