[OpenLayers-Users] Parsing GML - how to optimize?

Christopher Schmidt crschmidt at metacarta.com
Tue Dec 4 14:51:25 EST 2007


On Tue, Dec 04, 2007 at 11:41:32AM -0800, Jennifer Strahan wrote:
> Hello,
> 
> I have a GML file that is only about 130KB but it takes anywhere from 
> 9-12 seconds to load on the map.
> The file is here: 
> http://www.greatcommunities.org/xml_files/stations_corridors.xml
> The map is here: http://www.greatcommunities.org
> 
> Does anyone have any suggestions as to how I can optimize the parsing of 
> the GML file?  Do I have too many attributes?  Any recommendations would 
> be very helpful.

1. Get Firebug.
2. Open Firebug, hit Profile.
3. Load page.
4. Hit profile.

Top functions are parseAttributes and its children, getXmlNodeValue
calls. Total time for parseAttributes in all its glory is 7.9s: a 
lion's share of the total load time is in this function.

(extracting attributes is off by default because it's Very Slow.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list