3liz / py-qgis-server

QGIS embbeded WMS/WFS/WCS asynchronous scalable http server
https://docs.3liz.org/py-qgis-server
Mozilla Public License 2.0
68 stars 16 forks source link

Investigate slowness of GetLegendGraphic with json format #74

Open dmarteau opened 1 month ago

dmarteau commented 1 month ago

ref: https://github.com/3liz/lizmap-web-client/issues/4521

dmarteau commented 1 month ago

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:

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.

SecondGIS commented 3 weeks ago

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.

dmarteau commented 3 weeks ago

Stick to QGIS 3.34: we hope that https://github.com/qgis/QGIS/pull/58937 will be merged and backported soon.

SecondGIS commented 3 weeks ago

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.

dmarteau commented 3 weeks ago

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 https://github.com/qgis/QGIS/pull/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.

SecondGIS commented 3 weeks ago

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 ?

dmarteau commented 3 weeks ago

How should I understand this then ?

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.

SecondGIS commented 3 weeks ago

What about this there is no way to fix it then

dmarteau commented 3 weeks ago

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

dmarteau commented 3 weeks ago

Make sure you was using 3.34 at this time and not QGIS 3.38.

SecondGIS commented 2 weeks ago

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
Gustry commented 2 weeks ago

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 https://github.com/3liz/lizmap-web-client/issues/4521 was not reproduced. (which was before 3.38.3 was released)