Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate slowness of GetLegendGraphic with json format #74

Closed
dmarteau opened this issue Sep 19, 2024 · 15 comments
Closed

Investigate slowness of GetLegendGraphic with json format #74

dmarteau opened this issue Sep 19, 2024 · 15 comments
Assignees

Comments

@dmarteau
Copy link
Member

ref: 3liz/lizmap-web-client#4521

@dmarteau dmarteau self-assigned this Sep 19, 2024
@dmarteau
Copy link
Member Author

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.

@SecondGIS
Copy link

SecondGIS commented Oct 3, 2024

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
Copy link
Member Author

dmarteau commented Oct 3, 2024

Stick to QGIS 3.34: we hope that qgis/QGIS#58937 will be merged and backported soon.

@SecondGIS
Copy link

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
Copy link
Member Author

dmarteau commented Oct 9, 2024

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.

@SecondGIS
Copy link

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
Copy link
Member Author

dmarteau commented Oct 9, 2024

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
Copy link

What about this there is no way to fix it then

@dmarteau
Copy link
Member Author

dmarteau commented Oct 9, 2024

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
Copy link
Member Author

dmarteau commented Oct 9, 2024

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

@SecondGIS
Copy link

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
Copy link
Member

Gustry commented Oct 10, 2024

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)

@dmarteau
Copy link
Member Author

Issue has been fixed in QGIS 3.40 which has replaced 3.38 as current release

@SecondGIS
Copy link

Issue is still there with Lizmlap Web Client 3.8 and Qgis server 3.40

@dmarteau
Copy link
Member Author

dmarteau commented Dec 6, 2024

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....).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants