Opened 15 years ago

Closed 15 years ago

#1974 closed patch (fixed)

Enable render caching where possible

Reported by: timlinux Owned by: timlinux
Priority: minor: annoyance Milestone: Version 1.4.0
Component: MapCanvas Version: Trunk
Keywords: cache performance Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

User story 1:

Joe is reordering layers, each of which points back to a postgis database with thousands of records. Each time he drops a layer to a new position, he waits a long time while each layer redraws, even though the content of the layers is the same, just being rendered in a different order.

User story 2:

Jane is changing symbology in a layer. When she clicks apply, she waits a long time while all other layers redraw too.

User story 3:

Pete is hiding and showing layers. Each time he hides or shows a layer, he waits a long time while the layers redraw.

---

The solution to this is to provide some kind of caching mechanism. The attached patch is my first draft that addresses the above scenarios and makes QGIS much more responsive when engaged in the activities described.

Please note the patch is a work in progress and there are some edge cases where it does not yet behave well. In order to activate caching, tick the checkbox for this in the rendering tab of the options panel (its disabled by default).

Attachments (6)

qgis_render_cache_v3.diff (14.5 KB ) - added by timlinux 15 years ago.
Version 3 of my caching implementation
qgis_rendercachepatch_v4_21Oct2009.diff.gz (4.5 KB ) - added by timlinux 15 years ago.
Updated patch which fixes some rendering issues
qgis_rendercachepatch_v5_22Oct2009.diff (16.0 KB ) - added by timlinux 15 years ago.
Updated to use QImage
qgis_rendercachepatch_v6_23Oct2009.diff (18.5 KB ) - added by timlinux 15 years ago.
Fixes for some cases where caching resulted in unexpected renders
qgis_rendercachepatch_v7_23Oct2009.diff (19.8 KB ) - added by timlinux 15 years ago.
Added missing sip / python bindings
qgis_rendercachepatch_v824Oct2009.diff (20.3 KB ) - added by timlinux 15 years ago.
Fixes refresh isssues with raster layer when symbology changed

Download all attachments as: .zip

Change History (10)

by timlinux, 15 years ago

Attachment: qgis_render_cache_v3.diff added

Version 3 of my caching implementation

by timlinux, 15 years ago

Updated patch which fixes some rendering issues

by timlinux, 15 years ago

Updated to use QImage

comment:1 by timlinux, 15 years ago

Version 5 offers dramatically better performance now that I have changed it to use QImage rather than QPixmap. The last remaining task is to clear the cache images of non-visible layers when the extents change to prevent rendering anomalies when enabling display of a layer after a zoom operation.

comment:2 by timlinux, 15 years ago

Status: newassigned

by timlinux, 15 years ago

Fixes for some cases where caching resulted in unexpected renders

comment:3 by timlinux, 15 years ago

Version 6 of the patch is now quite usable and deals well with most issues I think. I will propose this patch for inclusion into trunk.

by timlinux, 15 years ago

Added missing sip / python bindings

by timlinux, 15 years ago

Fixes refresh isssues with raster layer when symbology changed

comment:4 by timlinux, 15 years ago

Resolution: fixed
Status: assignedclosed

This patch is applied to trunk as of r11831.

Note: See TracTickets for help on using tickets.