Mapfile Tuning

Ed McNierney ed at TOPOZONE.COM
Tue Sep 19 08:53:27 EDT 2006


Folks -

Yes, I agree with the "MapFile Tuning HowTo" David suggested.  I made
this same discovery a while ago - the "processing" of the mapfile (I
won't say "parsing" - see below) was taking 5 times as long as the
map-rendering process!

First, the time taken to load and process the mapfile is not displayed
if you have DEBUG ON and watch the layer-processing times.  This is,
naturally, because DEBUG ON isn't set until the mapfile's been
processed.

You should assume that MapServer will process your mapfile and
instantiate/load up every possible object in it just in case you want to
use it.  Do you have a lot of fonts and symbols?  MapServer will locate
and open every one of those raster symbol files each time that mapfile
is processed, just to make sure it's there, even if they're never used.

I have not found that unnecessary projection definitions are expensive,
but I certainly agree that minimalist mapfiles will save you a lot of
time.

I haven't had the time to look into this in detail, but thoughtful
application design in order to minize the complexity of your mapfiles
will definitely produce a performance and capacity improvement in "large
mapfile" applications.

     - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Pleyer, Walter
Sent: Monday, September 18, 2006 7:23 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Mapfile Tuning

Hi folks!

We are currently experiencing some performance troubles which we tracked
to the size of the mapfile.
We expect the mapfile to grow to well over 100 layers and analysis shows
that the parsing of this mapfile slows the mapgeneration down by almost
a second each time.
Is there enaything else, apart from using mapscript, that can be done to
tweak the performance?

Walter

LFRZ
A-1200 Wien, Dresdner Strasse 89
Tel:   ++43(1)33 176/421
Fax:   ++43(1)33 176/999
Mobil: 0676/5256642
Email: walter.pleyer at lfrz.at
WWW:   http://www.lfrz.at 



More information about the mapserver-users mailing list