performance tuning annotation layers

Erki Saluveer erki.saluveer at REGIO.EE
Mon Nov 14 06:01:54 EST 2005


 

Hello Xin,

 

 

I had a problem with performance issue when I had to use labeling for a
dense road network. I discovered that outlining takes a lot of time. My test
showed:

without labels ->0,18 sec
with labels -> 0,54 sec
with outlined labels ->1,45 sec
 
I got some help from Julien-Samuel Lacroix
<http://lists.umn.edu/cgi-bin/wa?A2=ind0506&L=mapserver-users&D=0&I=-3&X=79E
B134332FA237EE4&Y=erki.saluveer%40regio.ee&P=48374> .
He answered in Mapserver-user list:
 
The reason mapserver outlining is slower is that the outline is made by 
drawing the label 8 more times. To do a good outline, mapserver have to 
draw the label in all 8 directions in the color of the outline and then 
draw the label in the good color at the right place. This gives a 
perfect 1 pixel outline.
 
Even if it seems inefficient, this is what is suggest on the freetype 
mailing-list.
 
In bug 1243, there's 3 patch to use the freetype outlining options. It 
use a development version of freetype, though. The official release does 
not include this functionality.
 
See the bug for more details.
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1243
 
 
 
You have extra shadowing that is probably also taking a time.
 
Greetings,


Erki
 

 

 

  _____  

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Xin
Sent: Monday, November 14, 2005 12:21 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] performance tuning annotation layers

 

Hi,

I'm currently trying to produce my map under 1 second.  A tough goal, yes.
I've managed to speed it up from around 3s to 1.5s so far.  I did this using
various techniques, such as tileindexing, splitting up data, thinning data.

Using shp2img I can see drawing label cache takes the most time! Close to a
second.  Clearly there's some performance to be squeezed out here. I thought
I'd email for some advice.  Here's what most of my labels look like:

LABEL
            TYPE TRUETYPE
            FONT "arial"
            FORCE true
            SIZE 9
            POSITION CR
            MINDISTANCE 300
            MAXSIZE 20
            COLOR 0 0 0
            OUTLINECOLOR 255 255 255
            SHADOWCOLOR 255 255 255
            SHADOWSIZE 2 2 
            ANTIALIAS false
            PARTIALS FALSE
END

I notice if I'm using a bold font, they take quite some time longer.  Any
suggestions?

Cheers,
Xin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051114/20f75330/attachment.html


More information about the mapserver-users mailing list