<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=ET link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Hello Xin,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>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:<o:p></o:p></span></font></p>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>without labels ->0,18 sec<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>with labels -> 0,54 sec<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>with outlined labels ->1,45 sec<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>I got some help from <a
href="http://lists.umn.edu/cgi-bin/wa?A2=ind0506&L=mapserver-users&D=0&I=-3&X=79EB134332FA237EE4&Y=erki.saluveer%40regio.ee&P=48374">Julien-Samuel Lacroix</a></span></span>.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>He answered in Mapserver-user list:<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>The reason mapserver outlining is slower is that the outline is made by <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>drawing the label 8 more times. To do a good outline, mapserver have to <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>draw the label in all 8 directions in the color of the outline and then <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>draw the label in the good color at the right place. This gives a <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>perfect 1 pixel outline.<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Even if it seems inefficient, this is what is suggest on the freetype <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>mailing-list.<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>In bug 1243, there's 3 patch to use the freetype outlining options. It <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>use a development version of freetype, though. The official release does <o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>not include this functionality.<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'>See the bug for more details.<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt'><a
href="http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1243">http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1243</a><o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>You have extra shadowing that is probably also taking a time.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Greetings,<br>
Erki<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p> </o:p></span></font></pre>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
UMN MapServer Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Xin<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, November 14, 2005
12:21 PM<br>
<b><span style='font-weight:bold'>To:</span></b> MAPSERVER-USERS@LISTS.UMN.EDU<br>
<b><span style='font-weight:bold'>Subject:</span></b> [UMN_MAPSERVER-USERS]
performance tuning annotation layers</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>Hi,<br>
<br>
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.<br>
<br>
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:<br>
<br>
LABEL<br>
TYPE TRUETYPE<br>
FONT "arial"<br>
FORCE true<br>
SIZE 9<br>
POSITION CR<br>
MINDISTANCE 300<br>
MAXSIZE 20<br>
COLOR 0 0 0<br>
OUTLINECOLOR 255 255
255<br>
SHADOWCOLOR 255 255
255<br>
SHADOWSIZE 2 2 <br>
ANTIALIAS false<br>
PARTIALS FALSE<br>
END<br>
<br>
I notice if I'm using a bold font, they take quite some time longer. Any
suggestions?<br>
<br>
Cheers,<br>
Xin<o:p></o:p></span></font></p>
</div>
</body>
</html>