Re: [Qgis-developer] Expressions - performances of spatial operators
Hi Matthias, Thanks a lot for your answer. Unfortunately, I have no sponsors for this. I asked to improve my knowledge on this topic ;) Perhaps we could raise a crowdfunding for this improvement ? Cheers, Michaël 2016-07-05 15:31 GMT+02:00 Matthias Kuhn : > Hi Michaël, > > There are a couple of possibilities to improve the performance of > operations in two ways (which both help here AFAICS) > > * Give QgsExpression::prepare() more power > * Compile functions (where possible) > > The send one depends to some degree on the first one. > > Let me know if you have sponsors, I've got some experimental code > somewhere and I am very interested in working on this project. > > FYI, a first test - only the prepare part - some months ago improved the > 2.5D rendering by ~30%. > > Regards > Matthias > > On 07/05/2016 03:11 PM, kimaidou wrote: > > Hi all, > > > > I am a bit curious about performances concerning the use of Spatial > > expressions in QGIS, for example to select features like this > > > > intersects( > > $geometry, > > geom_from_wkt( 'MultiPolygon (((649308.282793968 > > 6978002.0599959021807, 649295.325809048 > > 6977994.5499981373549, 649235.924190952 > > 6978013.5099977648258, 649182.532793968 > > 6978077.3200029802322, 649212.347671694 > > 6978159.5300026077032, 649308.282793968 > > 6978002.0599959021807)))') > > ) > > > > NB: I have simplified the WKT representation here > > > > I am running this expression inside QGIS 2.14, for a layer containing > > approx. 100 000 features ( buildings). > > The WKT polygon represents a very small area compared to the whole > > layer: 500 features only are selected. > > > > It seems to me no spatial index is used, because it takes some time to > > run ~ 3 minutes. > > > > I have checked the option to run expressions server side, and all the > > layers are PostGIS layers. > > > > What could be done to improve this kind of expressions, which can be > > used elsewhere in QGIS ( to toggle labels for example ) ? > > > > Regards > > Michaël > > > > > > ___ > > Qgis-developer mailing list > > Qgis-developer@lists.osgeo.org > > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer > > > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Expressions - performances of spatial operators
Hi Michaël, There are a couple of possibilities to improve the performance of operations in two ways (which both help here AFAICS) * Give QgsExpression::prepare() more power * Compile functions (where possible) The send one depends to some degree on the first one. Let me know if you have sponsors, I've got some experimental code somewhere and I am very interested in working on this project. FYI, a first test - only the prepare part - some months ago improved the 2.5D rendering by ~30%. Regards Matthias On 07/05/2016 03:11 PM, kimaidou wrote: > Hi all, > > I am a bit curious about performances concerning the use of Spatial > expressions in QGIS, for example to select features like this > > intersects( > $geometry, > geom_from_wkt( 'MultiPolygon (((649308.282793968 > 6978002.0599959021807, 649295.325809048 > 6977994.5499981373549, 649235.924190952 > 6978013.5099977648258, 649182.532793968 > 6978077.3200029802322, 649212.347671694 > 6978159.5300026077032, 649308.282793968 > 6978002.0599959021807)))') > ) > > NB: I have simplified the WKT representation here > > I am running this expression inside QGIS 2.14, for a layer containing > approx. 100 000 features ( buildings). > The WKT polygon represents a very small area compared to the whole > layer: 500 features only are selected. > > It seems to me no spatial index is used, because it takes some time to > run ~ 3 minutes. > > I have checked the option to run expressions server side, and all the > layers are PostGIS layers. > > What could be done to improve this kind of expressions, which can be > used elsewhere in QGIS ( to toggle labels for example ) ? > > Regards > Michaël > > > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Expressions - performances of spatial operators
Hi all, I am a bit curious about performances concerning the use of Spatial expressions in QGIS, for example to select features like this intersects( $geometry, geom_from_wkt( 'MultiPolygon (((649308.282793968 6978002.0599959021807, 649295.325809048 6977994.5499981373549, 649235.924190952 6978013.5099977648258, 649182.532793968 6978077.3200029802322, 649212.347671694 6978159.5300026077032, 649308.282793968 6978002.0599959021807)))') ) NB: I have simplified the WKT representation here I am running this expression inside QGIS 2.14, for a layer containing approx. 100 000 features ( buildings). The WKT polygon represents a very small area compared to the whole layer: 500 features only are selected. It seems to me no spatial index is used, because it takes some time to run ~ 3 minutes. I have checked the option to run expressions server side, and all the layers are PostGIS layers. What could be done to improve this kind of expressions, which can be used elsewhere in QGIS ( to toggle labels for example ) ? Regards Michaël ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer