<div>Hi Thomas,</div>
<div> </div>
<div>Thanks for looking into this. I'm using plain old File Monitor to see that the .TTF file is being accessed hundreds of times. I've attached the output I'm receiving with this mail.</div>
<div> </div>
<div>I'm actually using the c# mapscript API in order to make use of MapServer. Could that have anything to do with this? Presumably this is just a wrapper around core MapServer functionality in any case?</div>
<div> </div>
<div>I notice you mention AGG. How do you configure MapServer to use AGG rather than GD? (Maybe a naive question but I'm new to this!)</div>
<div> </div>
<div>Regards,</div>
<div>Jon-Paul.<br><br></div>
<div class="gmail_quote">On Thu, May 12, 2011 at 10:43 AM, thomas bonfort <span dir="ltr"><<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On Thu, May 12, 2011 at 10:57, Jon-Paul Dobson <<a href="mailto:jpdobson40@gmail.com">jpdobson40@gmail.com</a>> wrote:<br>> Hi,<br>><br>> I just tried creating a qix file as suggested and found that the Shape file<br>
> now renders 22 times faster! Fantastic advice guys. Many thanks.<br>><br>> If only there was a way to prevent the TTF file being continuously accessed<br>> when displaying a symbol using a truetype font. Any further ideas at all? It<br>
> kind of makes a TTF unusable.<br></div>I've just straced and ltraced the access to the font file, and<br>mapserver/agg/freetype does *not* continually access the font file. By<br>default, agg maintains a cache of the last 32 glyphs that were<br>
accessed, so access to the font file only occurs if the the current<br>glyph is not in one of the last 32 to be requested.<br>what tool are you using indicating that the font file is accessed<br>multiple times?<br><br>--<br>
<font color="#888888">thomas<br></font>
<div>
<div></div>
<div class="h5"><br><br>><br>> Best regards,<br>> Jon-Paul.<br>><br>> On Thu, May 12, 2011 at 7:52 AM, Rahkonen Jukka <<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>><br>> wrote:<br>
>><br>>> Hi,<br>>><br>>> For clarification, it used to be rather a long time ago that the index<br>>> file (.qix) was not utilised even it was present in the data folder if the<br>>> LAYER DATA was given as<br>
>> DATA "C:\Data\WMS_DATA.shp"<br>>><br>>> Index was used only if the LAYER DATA was like<br>>> DATA "C:\Data\WMS_DATA"<br>>><br>>> However, this in old knowledge and both WMS_DATA.shp and WMS_DATA are<br>
>> utilising the index nowadays.<br>>><br>>> Gdal is using the same .qix index file system and therefore also QGIS.<br>>> There is more info about gdal shapefile spatial index in<br>>> <a href="http://www.gdal.org/ogr/drv_shapefile.html" target="_blank">http://www.gdal.org/ogr/drv_shapefile.html</a><br>
>> The page tells also that native ESRI spatial index files (.sbn/ .sbx) are<br>>> not supported.<br>>><br>>> -Jukka Rahkonen-<br>>><br>>><br>>><br>>> ________________________________<br>
>> Lähettäjä: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>>> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] Puolesta Ben Madin<br>
>> Lähetetty: 12. toukokuuta 2011 4:00<br>>> Vastaanottaja: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>>> Aihe: Re: [mapserver-users] Layer rendering performance problem<br>
>><br>>> I'm not sure whether it is still the case, but it used also to be that if<br>>> you wanted to use the index, you need to name the shapefile without the .shp<br>>> extension. If you used the .shp extension it wouldn't use the .qix index.<br>
>> So maybe this is a question - Is that still the case?<br>>> On a similar note, does anyone know ... is the index created with shptree<br>>> the same as the one created by QGIS (also a .qix file)?<br>>> cheers<br>
>> Ben<br>>><br>>><br>>> On 12/05/2011, at 10:45 AM, <a href="mailto:mapserver-users-request@lists.osgeo.org">mapserver-users-request@lists.osgeo.org</a> wrote:<br>>><br>>> From: Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br>
>> Date: 11 May 2011 11:53:34 PM AWST<br>>> To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>>> Subject: Re: [mapserver-users] Layer rendering performance problem<br>
>><br>>><br>>> look at the mapserver utilities:<br>>><br>>> shptree myshapefile<br>>><br>>> This creates a spatial index (*.qix) and you should create one for every<br>>> shapefile you are using.<br>
>><br>>> On Linux this will do the trick:<br>>><br>>> find /path/data -name \*.shp -exec shptree {} \;<br>>><br>>> If the .qix file is missing on every draw mapserver must create one on the<br>
>> fly in memory and the it throws it away.<br>>><br>>> -Steve W<br>>><br>>> On 5/11/2011 11:47 AM, Jon-Paul Dobson wrote:<br>>><br>>> Hi Jukka,<br>>><br>>> Thanks for getting back to me so quickly. No I haven't tried this. How<br>
>><br>>> is this done and what is the benefit? Aren't Shape files already indexed?<br>>><br>>> Regards,<br>>><br>>> Jon-Paul.<br>>><br>>> On Wed, May 11, 2011 at 4:41 PM, Rahkonen Jukka<br>
>><br>>> <<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a> <mailto:<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>>> wrote:<br>>><br>>> Hi,<br>
>><br>>> No answers but a question back. Have you created spatial index<br>>><br>>> (.qix) for your shapefiles with shptree?<br>>><br>>> -Jukka Rahkonen-<br>>><br>>> Jon-Paul Dobson wrote:<br>
>><br>>> > Hi,<br>>><br>>><br>>><br>>> > Whenever I display a layer based on a Shape file I notice that<br>>><br>>> the Shape<br>>><br>>> file is accessed constantly. This makes rendering extremely slow when<br>
>><br>>> compared to, for example, ESRI ArcIMS which appears to cache the<br>>><br>>> Shape file.<br>>><br>>> Is there an equivalent caching mechanism for Map Server? ArcIMS seems<br>
>> to<br>>><br>>> render an order of magnitude faster when the number of symbols runs<br>>><br>>> into the<br>>><br>>> 1000s<br>>><br>>><br>>><br>>> > Similarly, whenever I display layer symbols using a truetype font<br>
>><br>>> I notice<br>>><br>>> that the .ttf file is accessed for every symbol. This makes rendering<br>>><br>>> appallingly slow. Is there also any caching mechanism to prevent this?<br>
>><br>>><br>>><br>>> > Any insight anyone can give would be much appreciated.<br>>><br>>><br>>> Best regards,<br>>><br>>> Jon-Paul.<br>>><br>>><br>
>><br>>><br>>> _______________________________________________<br>>><br>>> mapserver-users mailing list<br>>><br>>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
>><br>>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>>><br>>><br>>><br>>> _______________________________________________<br>
>> mapserver-users mailing list<br>>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
>><br>><br>><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>><br></div></div></blockquote></div><br>