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