Jeff, Great tip!
My deployment uses a full compressed build of the openlayers.js file with some changes to vml.js (uses vml textpath - for <= IE8) and svg.js (uses text rotation - for Chrome and Firefox). This file comes in at 927 KB. I created a custom compressed build of the openlayers.js file, again including the vml and svg changes. The new file comes in at 443 KB; a very significant drop in size. Both files were built using the latest, hot off the press, OpenLayers-2.12-rc6. Prior to creating and using the new, smaller openlayers.js file, I tested the time to get the first raster image tile from boot up with the larger file which was 16 seconds. I did a one click zoom to the first layer that has PostGIS sitting behind it and that took a further 8 seconds. After that initial load of both layer types, everything is speedy with very little delay at all. I then substituted the new, smaller openlayers.js file and repeated the process from boot up. Low and behold, I get exactly the same results: 16 seconds then 8 seconds. Whilst there is probably a time saving in terms of milliseconds, the perceptional difference is nil. However, I do agree that the smaller openlayers.js file is the way to go in terms of reducing unnecessary initial traffic and also having less javascript in memory; something that will no doubt aid Internet Explorer speed-wise as that particular platform is chronic at best. Thanks again for the tip. Regards, Donald -----Original Message----- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff McKenna Sent: 08 June 2012 16:10 To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Mapserver/PostGIS Faster Initial Load Time On 12-06-06 4:35 PM, Donald Kerr wrote: > Basically my mapping setup is, from client to server, Openlayers > WMS/WFS (Internet Explorer on XP Pro SP3) - Mapserver CGI - Shapefile > (Tiffs) or PostGIS (XP Pro SP3 - IIS & FastCGI). > >>From boot up, the initial, or first load of maps, takes up to 15 >>seconds. > After that, it flies along fine. > > I've tried pre-loading in a hidden browser instance but that didn't > work. I cannot get that initial load time down at all. > > Any tips to reduce the time taken for the first load of the software: > Specifically Mapserver whether it's creating the map from PostGIS or > the shapefile (Tiffs). I can give my experiences here. I have a very slow server that I use for client demos, and I very often hit this exact same issue (my OpenLayers/MapServer WMS/WFS application takes very long to load initially, then zooms along). In my case, the long initial load is always due to the large lib/OpenLayers.js file; I solve this by generating an 'OpenLayers-lite.js' file (through the instructions at http://docs.openlayers.org/library/deploying.html). I hope that helps someone along the way. Have a nice weekend all. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users