Feature request #3200

Feature cache

Added by Martin Dobias over 6 years ago. Updated over 1 year ago.

Status:Open Start Date:
Priority:Normal Due date:
Assigned to:Martin Dobias % Done:

0%

Category:Vectors
Target version:Future Release - Nice to have
Platform: Resolution:
Platform version: Pull Request or Patch supplied:Yes
Status info:0 Tag:

Description

It would be nice to have caching of features within vector layers. With caching, we could speed up the rendering by not fetching the data from (slow) data source on every render and store the features for some time in the memory.

Attached patch has been developed about more than one year ago as a first attempt to add this functionality to QGIS. It will have to be modified in order to be usable with current svn trunk. It has been shown with the patch that 2x speed up can be achieved (and maybe more). The patch also needs more testing / improvements as it modifies various areas within the core.

featurecache_patch.diff - initial patch (probably not working with current trunk anymore) (120.1 kB) Martin Dobias, 11/12/2010 01:01 am

History

Updated by Martin Dobias over 6 years ago

It should be also noted that this patch has been developed by Andrej Krutak (not me!) within qgis-mapper project.

Some notes for the author:

  • The "Cache nothing" option completely disables caching and features are always retrieved from data provider.
  • The "Heuristics" option keeps reasonable amount of features in memory, by releasing some of them when the current extent is much smaller than the cached area.
  • The "Cache all layer's features" option allows cache to store all features displayed. This doesn't neccesarily mean that all vector layers' data will be cached - once the cache is enabled, it only holds features from the biggest extent displayed (i.e. if user zooms-out, and required data are superset of the currently cached data extent - the cache is freed and refilled with the superset data - which are of course read from the data provider). Also, if user moves current extent, so that the already cached extent only partially overlaps with the new one, the previous data will be released and the new extent cached. This "filling behaviour" is the same as the one of "Heuristics" option.

Updated by luca76 - over 6 years ago

this could be a very useful fix!

Updated by Giovanni Manghi over 5 years ago

  • Priority changed from Low to Normal
  • Target version changed from Version 1.7.0 to Version 1.8.0
  • Pull Request or Patch supplied set to Yes

Updated by Nathan Woodrow over 5 years ago

+1 to this

This patch plus the multi-threaded rendering could add some good speed to QGIS.

Updated by Giovanni Allegri over 5 years ago

I would change the expected version for this patch to 2.0.0, waiting to include it along the multi threaded rendering

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0
  • Must fix deleted (No)
  • Platform deleted (All)

Tagged to 2.0

I would like to underline, without boring anyone :), that improving QGIS performances with large vectors, both when rendering and editing, seems to be a pretty high priority.

See also #4433 that is basically a show stopper

and #1978 which is just a little less a show stopper that than the previous one

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by rburhum - over 1 year ago

Should I not get my hopes up for this since it has been 3 years? :(

Also available in: Atom