shapeObj buffer resize algorithm

Frank Warmerdam fwarmerdam at GMAIL.COM
Wed Jul 27 10:42:36 EDT 2005


On 7/27/05, Kovacs Baldvin <baldvin at cs.elte.hu> wrote:
> Well. The thing is, in my application there are lots of multilines.

Baldvin,

Ah, well this is (I think) uncommon. 

> > I am somewhat concerned by your optimization because it now means
> > anywhere that creates a local lineObj needs to remember to
> > properly initialize the bufsize array.  You may have found and updated
> 
> Hey, but I don't accept this. If one chooses not to use a correct
> object-oriented style, than one has to take the consequences. 

Well, I would claim the consequence is a willingness to keep certain
core concepts unchanged rather than the consequence being that
messy things need to be put in many different places. 

> I've attached a patch that makes the msAddLines variants to use
> relocate, but without introducing the manual heuristic. I think
> it is the reasonable solution...

I concur.  It seems to capture most of the benefit without the risk
of side effects.  I have submitted this as bug 1432, and will take
care of applying it this morning.  I think I will also remove the 
duplication between msAddLine and msAddLineDirectly which is
my fault from previous efforts.

  http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1432

Thanks for the help performance tuning MapServer!

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list