Bug report #14800

Problem rendering joined field from csv

Added by Willy Bueno over 8 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:Matthias Kuhn
Category:Unknown
Affected QGIS version:2.14.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22757

Description

QGIS 2.14 hangs when applying gradient symbology on a joined field. Doing the same symbology on an attribute field has no problem. This problem does not exist in 2.12. Please find attached sample project.

RenderCSV.zip (237 KB) Willy Bueno, 2016-05-10 02:26 AM

Associated revisions

Revision 22acf3b1
Added by Nyall Dawson over 8 years ago

Avoid refreshing canvas for every joined feature

Instead of setting the provider's subsetString to fetch joined
features, use a feature request with FilterExpression instead.
(Setting the subsetString results in a canvas refresh.)

Performance should be similar (if expression compilation is
enabled) and this also has the advantage of avoiding provider-
specific behaviour (eg case insensitive matching).

(fix #14800)

Revision 804ac7e5
Added by Nyall Dawson over 8 years ago

Avoid refreshing canvas for every joined feature

Instead of setting the provider's subsetString to fetch joined
features, use a feature request with FilterExpression instead.
(Setting the subsetString results in a canvas refresh.)

Performance should be similar (if expression compilation is
enabled) and this also has the advantage of avoiding provider-
specific behaviour (eg case insensitive matching).

(fix #14800)

(cherry-picked from 22acf3b1a3e7a6afe094ec6dec83776256d2655a)

History

#1 Updated by Nyall Dawson over 8 years ago

  • Assignee set to Matthias Kuhn

Matthias - ( assigning you just to draw your attention to this). I've tracked it down and it looks like it was caused by 0f2dfdb19bd1ace179a6b19cc1dbc4e4918d3f10 - "Reload data when subsetString changes.". The issue is that QgsVectorLayerFeatureIterator::FetchJoinInfo::addJoinedAttributesDirect repeatedly calls setSubsetString, and for every feature this results in the dataChanged() signal being emitted. This signal gets caught by map canvas and forces a redraw. So for every feature a redraw is occurring... ouch! Any ideas on a fix for this?

#2 Updated by Nyall Dawson over 8 years ago

  • Status changed from Open to Closed

#3 Updated by Jürgen Fischer about 7 years ago

  • Category set to Unknown

Also available in: Atom PDF