[Qgis-developer] QGIS Server performance deterioration

René-Luc Dhont rldhont at gmail.com
Tue Jun 7 06:58:22 PDT 2016


Hi devs,

David Marteau, our colleague in 3Liz, has found some serious 
deteriorations of performance in QGIS Server.

The first one concerne QgsExpressionContext which is not clean up in 
QgsServer::handleRequest

Each call to QgsMapLayer::draw add items to QgsExpressionContext scope.
The scope is not cleaned between request and thus the scope list to grow 
indefinitely.

Having the list growing indefinitely deteriorate seriously performances 
in the long run. It also increase the memory footprint but in a less 
noticiable way.

This behavior has been checked by monitoring reponse time of several ten 
of thousand identical requests during server long runs.

This has been fixed in master and in LTR:
https://github.com/qgis/QGIS/commit/5c3aa51e80887de6ff76682a42814041bb32cd5b
https://github.com/qgis/QGIS/commit/50181eee00709e3f7e29b2b53282f28bdedfe265

Now we encounter an other issue with deteriorationof performance in QGIS 
Server.

This issue is due to the slot 'layerWasAdded' in QgsMapLayerRegistry. 
The duration of the emit layerWasAdded grows with the number of drawing. 
Do you know what it is done when 'layerWasAdded' is emitted ?

Regards,
René-Luc D'Hont
3Liz


More information about the Qgis-developer mailing list