Bug report #18249
QGIS Server 2.18 much slower than 2.14 (at least for WFS getfeature requests)
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | René-Luc ReLuc | ||
Category: | QGIS Server | ||
Affected QGIS version: | 2.18.17 | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26140 |
Description
After an update from QGIS server 2.14 to QGIS Server 2.18 (LTR) I note that WFS requests using a layer with ~ 25'000 record are very slow!
I try to remove some field from WFS output but the time response is always very high!
This is for example a query to a spatialite layer.
If I use a postGIS layer normally apache crash
History
#1 Updated by Giovanni Manghi over 6 years ago
- Status changed from Open to Feedback
- Subject changed from QGIS Server WFS query slow to QGIS Server 2.18 much slower than 2.14 (at least for WFS getfeature requests)
I tried myself and I confirm the fact that QGIS 2.18 is much slower than 2.14. I can't confirm the crash using PostGIS layers.
My testing scenario: 2 servers (ubuntu server) with the same hardware (on the same network) one with QGIS Sercver 2.14, the other with 2.18. On both I uploaded a QGIS Desktop project created with the equivalent QGIS Desktop version, both projects loading a MultiPolygon PostGIS layer with ~28000 features coming from the same server (a third server on the same network of the ones publishing the WFS service).
I have done repeatedly
time wget "url_of_getfeatures_wfs_request_outputting_to_geojson"
and on average the 2.18 server is 30 second slower than the 2.14 one. Moreover the size of the resulting geojson is also larger (6mb larger in this case) than the one created by QGIS Server 2.14.
#2 Updated by René-Luc ReLuc over 6 years ago
It's simply due to the transformation of the geometry from the layer CRS to standard GeoJSON CRS EPSG/4326.
#3 Updated by Giovanni Manghi over 6 years ago
René-Luc ReLuc wrote:
It's simply due to the transformation of the geometry from the layer CRS to standard GeoJSON CRS EPSG/4326.
this is about the difference is size, correct?
#4 Updated by Roberto Marzocchi over 6 years ago
Giovanni Manghi wrote:
René-Luc ReLuc wrote:
It's simply due to the transformation of the geometry from the layer CRS to standard GeoJSON CRS EPSG/4326.
this is about the difference is size, correct?
the size difference is strange because lat/lon normally use less digit than projected CRS
concerning time it is better to reproject the layer in EPSG/4326?
#5 Updated by Roberto Marzocchi over 6 years ago
I try using a layer in WGS 84 but the time is similar (or higher) ~ 5'20'' and the size is higher.. I really do not understand the problem..
The postGIS layer has ~25'000 polygon
#6 Updated by René-Luc ReLuc over 6 years ago
- Assignee set to René-Luc ReLuc
- Regression? changed from No to Yes
- Operating System deleted (
Ubuntu 16.04) - Status changed from Feedback to In Progress
I have found why QGIS Server 2.18 is slower in generating GeoJSON. I'll fix it!
#7 Updated by René-Luc ReLuc over 6 years ago
- Pull Request or Patch supplied changed from No to Yes
Fix done for 2.18 e53f4a83a9cadcd1f941a224eecf492dc1da7df7
The cherry-pick to 3.0 and master has to be test.
#8 Updated by Roberto Marzocchi over 6 years ago
René-Luc ReLuc wrote:
Fix done for 2.18 e53f4a83a9cadcd1f941a224eecf492dc1da7df7
The cherry-pick to 3.0 and master has to be test.
I will test as soon as possible on my server with ltr version
#9 Updated by Roberto Marzocchi over 6 years ago
Now it works fine! Confgratulation to René-Luc ReLuc! In my opinion we can close this ticket.
I do not know how qgis-server 3.0 works, because normally I works with LTR
#10 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented
- Status changed from In Progress to Closed
Roberto Marzocchi wrote:
Now it works fine! Confgratulation to René-Luc ReLuc! In my opinion we can close this ticket.
I do not know how qgis-server 3.0 works, because normally I works with LTR
I am under the impression (hopefully wrong because I only tested QGIS Server on Windows at the moment) that QGIS Server 3 is much slower. But I guess we have to wait for more people to test and leave feedback.