[mapserver-dev] labelcache and multiple calls to msDrawMap

Steve Lime steve.lime at dnr.state.mn.us
Tue Oct 22 12:29:37 EDT 2002


I added this last night and will commit as soon as the CVS will let me
in...

Steve

>>> Daniel Morissette <morissette at dmsolutions.ca> 10/21/02 01:35PM >>>
Makes complete sense to me.  The $map->draw() call creates a new image
anyway, so it would make little sense to carry an old label cache in a
new map image.

Daniel

P.S. I cc'd the message to the mapserver-dev list so that we start
using
it again.


Steve Lime wrote:
> 
> Thought about it a bit more. We could add the label cache clearing
call
> to the front
> of the drawing process (i.e. make sure the cache is clear before
> starting). That way
> it would remain accessible after drawing for post-processing. Sound
> ok?
> 
> Steve
> 
> >>> Daniel Morissette <morissette at dmsolutions.ca> 10/16/02 05:11PM
>>>
> Jill Vogel wrote:
> >
> > > I was not the one who suggested clearing the label cache, I
think
> it was
> > > Steve.
> > Oops..sorry..
> > > But anyway I believe the reason was that after a call to
> > > $map->draw() the cache was not cleared and then if you would
draw
> > > another map in the same script execution then the labels
accumulate
> in
> > > the cache and the old ones would be drawn again on the new map.
> > >
> > > Daniel
> >
> > That's the problem I've been seeing.  Is there any reason the
cache
> > shouldn't be cleared after the map is drawn?  I can't tell if it
> makes
> > any future draws of the same map faster.
> 
> I don't see any reason why the cache could not be cleared
> automatically
> after the map is drawn.  I really doubt that not clearing the cache
> would make things faster.  If anything it would make them slower
since
> the cache grows and more labels have to be drawn each time.  BTW
this
> is
> not controlled by MapScript, it's the MapServer internal msDrawMap()
> function that behaves this way.
> 
> I'm not sure if Steve really intended things to be this way or if he
> just forgot to clear the label cache at the end of a map draw. I
will
> have to let him answer on this.
> 
> Daniel
> --
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca 
>  DM Solutions Group              http://www.dmsolutions.ca/ 
> ------------------------------------------------------------



More information about the mapserver-dev mailing list