number of layers in mapfile
Ed McNierney
ed at TOPOZONE.COM
Thu Aug 30 04:46:12 PDT 2007
Eric -
I would not want to suggest that there's anything particularly "wrong" with the way MapServer processes layers in a mapfile. I'm sure it could be faster, but in general the real issue is asking any application to do a lot of work you don't need. If you don't need to use 500 layers in a map request, don't ask MapServer to parse and prepare 500 layers for you before it starts drawing.
It's always a good idea to get your application working *correctly*, and then get it working *quickly*. Using a lot of layers in a mapfile makes it easy to get your application up and running, but pruning of layers (and fonts, and symbols, and projections, etc.) to improve performance after it's working is definitely something everyone should keep in mind.
- Ed
Ed McNierney
Chief Mapmaker
Demand Media / TopoZone.com
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: 978-251-4242, Fax: 978-251-1396
ed at topozone.com
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Eric Lemoine
Sent: Thursday, August 30, 2007 2:28 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] number of layers in mapfile
On 8/27/07, Fawcett, David <David.Fawcett at state.mn.us> wrote:
> I think that the summary is that conclusion is that a map file with 500
> layers is going to be significantly more expensive than a map file with
> five layers. Even with all of the possible optimization tricks.
>
> If you really need to have a map file with 500 layers (e.g. you need all
> 500 layers to draw one map), you will likely have to deal with slower
> performance.
>
> The bigger question to me is, do you really need 500 layers?! I can't
> imagine a lot of applications that would.
>
> There are people who have lot's of possible data layers, but really only
> need a dozen or so at a time. They are using the INCLUDE option or a C
> pre-processor to custom build map files on the fly.
>
> I would first try to figure out if you really needed such a giant map
> file.
Hi,
Yes, I should be able to split my mapfile into multiple mapfiles. I
just wanted to check with the list that having lots of layers in the
mapfile can effectively cause performance issues.
Thx,
--
Eric
More information about the MapServer-users
mailing list