Label Cache Performance

ROBERT HOLLINGSWORTH reh2 at PRODIGY.NET
Wed Jan 3 11:42:10 EST 2007


> 
> Last year I spent a fair amount of time optimizing a
> bunch of mapfiles 
> for performance. One of the areas that seems to
> always be a performance 
> hog if processing the Label Cache....

quick thoughts on subject:

* worked on an overlap prevention scheme back in 90s,
did rectangle comparison in two stages: first, compare
orthogonal bounding rectangle for the candidate
against same ortho rect for placed entities (in this
case, text and non-text objects). A positive collision
test may be case where two objects are rotated and the
ortho rect contains much white space (i.e., a false
positive).  If that occurs, then compare the tightly
fitting rotated rectangles, which is a more expensive
computation, but not necessary unless the orthos have
collided.

* any thoughts on creating an index scheme so that
collision detection is only performed "in the
neighborhood" of the candidate placement?  Maintaining
this, with a crude tile scheme or the more advanced
quadtree approach, can be more expensive than it's
worth unless the number of entities is past a certain
threshold.

REH



More information about the mapserver-dev mailing list