Bug report #14792
Memory leak with big Shapefile
|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 #:||22749|
I have just found a memory leak in QGIS Desktop (and server) with the project available in  ( a 20Mo tar.bz2 )
This is a very simple project with only one buildings Shapefile ( SHP 68Mo). This layer has been exported from PostGIS from a query wich aimed to simplify the building for fast rendering.
The geometries have been simplified ( I used SnapToGrid, then (St_Dump(St_Union(a.geom))) to remove as many nodes as possible )
The layers has ~ 700 000 features.
steps to reproduce the bug, and the precautions to take :
- open the project in QGIS 2.14 ( I have not tested with older versions)
- open a terminal and use this kind of command to monitor QGIS memory consumption : htop, or ps with
watch -n1 'ps -aux --sort -pmem | head -5'
- Navigate through the project by zooming in and out, pan, etc. I think you emphasize the memory leak by displaying the layer at small scale ( with many buildings displayed)
- Be aware that this will increase the memory, so keep an eye on the memory consumption so that your system has enough free memory to work properly.
I have no memory leak when using the same dataset in PostGIS ( tested by importing the Shapefile in PostGIS with shape2pgsql )