[Qgis-developer] Potential performance improvements by using Qt's Graphics View Framework

Marco Hugentobler marco at hugis.net
Mon Apr 5 14:41:48 EDT 2010


Hi Jae

Isn't it possible to use the 'render cache' option to improve speed in such 
situations (options->rendering & svg -> use render caching...)? With this 
option, every layer stores and reuses its current image if possible (e.g. one 
layer changes symbology).

Regards,
Marco


Am Montag, 5. April 2010 19.55:39 schrieb Jae Sammy:
> After trying to optimize my project that loads layers that fall into three
>  categories: * A large number of static rasters (as a background)
>  * A small number of PostGIS layers that change frequently (once every
>  couple of seconds) * A large number of PostGIS layers that change
>  infrequently (once every couple of minutes) I seem to have hit a brick
>  wall.
> 
> It appears that QGis boils all of the loaded layers down to a single
>  QGraphicsRectItem (QgsMapCanvasMap).  This means that in my case, I must
>  trigger a repaint on every layer every couple of seconds, yikes!
> 
> Qt's native Graphics View Framework
>  (http://doc.trolltech.com/4.4/graphicsview.html) supports just this type
>  of situation and does all the heavy lifting for us.  Why are we not taking
>  advantage of this?
> 
> Currently, QgsMapCanvas instantiates a QGraphicsScene but the only item
>  added is our QgsMapCanvasMap.  Instead, it seems like there are
>  performance advantages to be gained by having each layer inherit from
>  QGraphicsItem and implement its own paint().  Then only the layers that
>  need updating can be updated and only the segment of the scene that
>  actually changes (and is in view) will be re-drawn.
> 
> -Jae
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


-- 
Dr. Marco Hugentobler
HUGIS GmbH
Webereistr. 66
CH-8134 Adliswil
marco at hugis.net
www.hugis.net
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list