Mapfile layers performance question

Ed McNierney ed at TOPOZONE.COM
Tue Mar 6 07:30:11 EST 2007


Steve -

Well, they WILL affect performance - you need to decide if they affect
it in a significant way.  Loading and parsing a map file takes time, and
the bigger the file is the more time it will take.  A while back I
discovered that, having optimized my data access pretty well, over half
of my MapServer overall response time was being spent simply loading the
map file!  But that's because I was taking the "convenient" route and
putting everything into one big map file.

How many is "a lot of layers", and how many do you use?  Are the layers
you DO use particularly complex?

Note that you cannot use DEBUG ON to get a report on map file loading
time as a percentage of MapServer's total response time, since MapServer
doesn't know you've selected DEBUG ON until it has loaded the map file.
It was quite a while ago, and I didn't keep the code, but it's pretty
easy to add a few lines to turn on timing and logging for the map file
itself.  You just need to remember that it's not optional and you'll
keep to recompile or keep a separate binary to turn it off.

	- Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Steve Hall
Sent: Tuesday, March 06, 2007 7:02 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Mapfile layers performance question

Hi all,

Just a quick question.   Is there any (noticeable) performance hit in 
having a lot of layers in a mapfile with their STATUS set to OFF.   I 
don't want to use these layers right now but may need to switch them on
at a later date, so it's convenient to have them in there, but not if
they're affecting performance at all.....

Thanks,

Steve H



More information about the mapserver-users mailing list