[Qgis-developer] comments on qgsvectorlayer.cpp

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Fri Aug 31 02:57:57 EDT 2007

On Friday 31 August 2007 02:36:25 Martin Dobias wrote:

> I've been thinking about this - mostly about where to put the caching
> mechanism. There are generally two options:
> - cache objects ready for painting (as you suggest) - e.g. save
> ready-made QPolygonF instances
> - cache objects fetched from data provider - e.g. save QgsFeature instances
> I like the second option more due the fact you're mentioning - when
> scaling or scrolling we would need to recalculate the coordinates
> somehow. More clean way seems to me to cache the features with their
> map (not screen) coordinates.

I also like the idea of a feature cache. Btw, it seems that the Java folks 
already do this, and there will be a presentation at the FOSS4G conference:

Hopefully they will upload the slides later for those who cannot join (like 

Additionally to a cache on feature level, it would also be good to have 
smarter zooming and panning as this enhances the user perceived performance. 
Similar to OpenLayers, a background thread could already render image pieces 
adjacent to the current view so that panning is a very fast operation. For 
zooming, I like the way of udig, where the image is scaled first and the 
rendered tiles appear successively.


> >         Any way, I was interested in knowing how it all worked and try to
> > find out if there've been some discussions regarding theses performance
> > issues.
> It's great to see that some people look into the QGIS code and try to
> improve it! I'm looking forward to see here some more discussion about
> the rendering performance.
> Regards
> Martin
> P.S. nowadays I'm moving to my new place so I'll be probably less
> responsive until I settle down.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer

Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch

More information about the Qgis-developer mailing list