[mapserver-dev] Labelcache potential optimization using spatial index

thomas bonfort thomas.bonfort at gmail.com
Tue Feb 26 08:40:56 PST 2013


> I wonder how many labels one would have to be dealing with for this overhead and complexity to be worth it.
My gut feeling is also that a spatial index won't provide any
noticeable speedup, and may potentially even slow things down. The
reason for this is that in a typical map render, only a small number
of labels  (i.e. in the order of the 10s, max 100s) make it into the
rendered map, and those are the only ones that could be put in the
spatial index. Given that these rendered labels already have a
bounding box test before a full intersection test with subsequent
label candidates, I suspect that this process is at least fast as what
we could get with an index.
Of course, if someone wants to implement such an indexing, I will be
happy to be proved wrong if it results in a performance enhancement :)

regards,
thomas


More information about the mapserver-dev mailing list