Feature request #3200

Feature cache

Added by Martin Dobias over 6 years ago. Updated 23 days ago.

Status:Open
Priority:Normal
Assignee:Martin Dobias
Category:Vectors
Pull Request or Patch supplied:Yes Resolution:
Easy fix?:No

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 Magnifier - initial patch (probably not working with current trunk anymore) (120 KB) Martin Dobias, 11/12/2010 01:01 AM

History

#1 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.

#2 Updated by luca76 - over 6 years ago

this could be a very useful fix!

#3 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

#4 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.

#5 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

#6 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)
  • Operating System 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

#7 Updated by Pirmin Kalberer over 4 years ago

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

#8 Updated by rburhum - over 1 year ago

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

#9 Updated by Giovanni Manghi 23 days ago

  • Easy fix? set to No

Also available in: Atom PDF