Bug report #18249
QGIS Server 2.18 much slower than 2.14 (at least for WFS getfeature requests)
|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|
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
#1 Updated by Giovanni Manghi over 3 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.
#4 Updated by Roberto Marzocchi over 3 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?
#10 Updated by Giovanni Manghi over 3 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.