Investigate slowness of GetLegendGraphic with json format
Closed this issue · 15 comments
From preliminary tests with a project with 400+ layers tests we do not observe any issues about the 'GetLegendGraphic' and py-qgis-server.
Theer is two cases:
- No plugin with AcesseControlFilters
- Using a plugin with AccessControlFilters (i.e Lizmap server plugin)
There is a notable slow down (x50) on a request with a access control filter since all layers are checked for permissions on each requests (wtich is a imlementation issue in QGIS server itself).
A simple GetLegendGraphic without filter takes only few ms while a request with all filters activated will take about 400 to 800 ms
depending your asking for json or png.
As a matter of fact requesting json output is twice faster than requesting png output in both cases.
All requests are direct http requests to py-qgis-server itself.
Thanks for your investigations.
From what I understand the slowness problem I faced is not directly related to py-qgis-server but to AccessControlFilters inside lizmap-server plugin. Are those filters enabled by default in the plugin ? How do I disable them without disabling lizmap-server completely ? Can I disable them from QGis desktop (I haven't enabled anything user access related in my projects) or should it be performed server side ?
Thanks for your answers.
Stick to QGIS 3.34: we hope that qgis/QGIS#58937 will be merged and backported soon.
Hey there,
I just saw that that issue has been merged recently for QGis 3.40... How will I know if (and when) it is backported to 3.34 ?
Thanks for your answer.
How will I know if (and when) it is backported to 3.34 ?
It won't as 3.34 is not concerned by the issue fixed by qgis/QGIS#58937 , only 3.38 - There will be no more release of 3.38, so you should avoid 3.38.
The next ltr will be 3.40 for which the issue is fixed, it will be the next 'release' version replacing the 3.38 in some weeks from now.
Stick to QGIS 3.34: we hope that qgis/QGIS#58937 will be merged and backported soon.
How should I understand this then ?
How can I solve my GetLegendGraphic issue with LizMap 3.7.10 / QGis 3.34 ?
How should I understand this then ?
- Stick to 3.34 => Stay with 3.34 instead of 3.38
- we hope that qgis/QGIS#58937 will be merged and backported soon. => backported in 3.38 but that's not going to happen.
How can I solve my GetLegendGraphic issue with LizMap 3.7.10 / QGis 3.34
Afaik, there is no issues with Qgis 3.34 since what produced slowness with access control was not ported to 3.34. We have not been able to reproduce any slowness with Qgis 3.34.
What about this there is no way to fix it then
I don't know since I have not been able to reproduce the issue with Qgis 3.34
Make sure you was using 3.34 at this time and not QGIS 3.38.
Issue appeared with 3.28 and was not fixed by upgrading to 3.34.
Maybe the issue was caused by another component then like lizmap_server plugin ?
Here are the versions of all components when I faced the issue :
Lizmap Web Client : 3.7.10
Lizmap plugin : 4.3.24
QGIS Desktop : 3.28.15
QGIS Server : 3.28.13
Py-QGIS-Server : 1.8.8
QGIS Server plugin atlasprint : 3.3.2
QGIS Server plugin lizmap_server : 2.10.0
QGIS Server plugin wfsOutputExtension : 1.8.0
I think there is a mix in the discussion here ;-)
You should talk with patch version IMHO.
@dmarteau is talking about a regression only in 3.38.3. This regression is not in 3.38.2. Only one release is impacted by the issue reported @dmarteau.
Then, the issue raised in this tiicket description 3liz/lizmap-web-client#4521 was not reproduced. (which was before 3.38.3 was released)
Issue has been fixed in QGIS 3.40 which has replaced 3.38 as current release
Issue is still there with Lizmlap Web Client 3.8 and Qgis server 3.40
This is a problem related to Qgis server plugins: if you think it is related to py-qgis-server, plz narrow your tests by disabling plugins and request GetLendGraphic directly to py-qgis-server (no Lizmap no plugins....).