[Qgis-developer] WMS Design Problem and Mac Crash

Tim Sutton tim at linfiniti.com
Sun Feb 11 06:30:56 EST 2007


Hi

I support this idea. In fact it might work well with and idea I had
some time ago for creating a caching and composition manager for QGIS.
The idea being that when a scene is rendered and the extents havent
changed (e.g. one layers visibility was toggled) the compoistion
manager renders the layers directly from the cached copy rather then
redrawing every aspect of the scene. In addition to that we can gain
on performance by not rendering part of the scene that were rendered
in the last draw event. For example if the user pans, we can just
fetch the new area of the scene and stitch it onto the still visible
parts of the last scene. For things like WMS I think this could
provide an especially good performance benefit. Also for network
intensive layers like PostGIS it should provide some benifit. Letting
the user allocate a certain amount of memory (or disk space like
google earth does), we could in fact store numerous previously
rendered layers scenes and pull them straight from disk. If course we
would need to flush the cache for a layer if its symbology changes
etc.

So adding loadImage() to the mapLayer interface would be a good first
step in that direction.

Regards

Tim



2007/2/11, Tom Elwertowski <telwertowski at comcast.net>:
> Hi all,
>
> I'd like to fix a Mac crash and some redraw problems which involve a
> change extending through several layers of QGIS so I am putting this out
> for review before proceeding. The redraw problem can be seen using a WMS
> layer when resizing the window and sometimes when zooming. Only 0.8
> crashes but the redraw issues are the same in 0.8 and 0.9.
>
> The WMS provider calls processEvents to fetch a remote image while
> inside a draw event. processEvents is needed to receive the network
> event containing the retrieved image, however, calling processEvents
> during a draw event on a Mac can result in incorrect drawing or a crash.
>
> The problem occurs because processEvents may process other draw events
> while waiting for the remote image and, at least on a Mac, draw events
> cannot be interrupted by other draw events.
>
> To a lesser extent, odd redraw artifacts also remain in Ubuntu after
> resizing a WMS layer.
>
> One fix is to add a loadImage routine to the provider so that the canvas
> can notify all layers about what is needed beforehand and not call
> QPainter::begin until all images are locally available.
>
> For local layers, loadImage does nothing. For remote layers, loadImage
> initiates a transfer if the cache is invalid. The canvas then needs to
> wait until all layers signal ready.
>
> Tom
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


-- 
-- 
Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list