| Date | Mon, 30 May 2011 04:04:02 GMT |
| Content-Type | text/html; charset=UTF-8 |
| Server | mafe |
| Content-Length | 11957 |
| X-XSS-Protection | 1; mode=block |
| Host | maps.googleapis.com |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0 |
| Accept | */* |
| Accept-Language | en-us,en;q=0.5 |
| Accept-Encoding | gzip, deflate |
| Accept-Charset | ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| Keep-Alive | 115 |
| Connection | keep-alive |
| Referer | http://foothill-web-gis.googlecode.com/svn/trunk/webgis/fhwebmapdemo.html |
| Last Modified | Sun May 29 2011 21:04:02 GMT-0700 (PDT) |
| Last Fetched | Sun May 29 2011 21:04:02 GMT-0700 (PDT) |
| Expires | Wed Dec 31 1969 16:00:00 GMT-0800 (PST) |
| Data Size | 11957 |
| Fetch Count | 2 |
| Device | disk |
You are correct in inferring that the file is taking too long to fetch.
By appending a random number (to prevent Google caching the file) you
are effectively making the KML file dynamic - Google must download and
parse the file every time you change that random number.
I used wget to time downloading that file a few times, and saw a
median download time of 6 seconds and a maximum of 59 seconds (SVN is
probably not well suited to acting as a content server). Ideal
download times would be under 1 second.
Some suggestions:
* Most importantly, do not append random numbers to your KML file when
your site is in production. Change the URL only when the content of
the underlying KML file has actually changed. During development is
fine.
* Consider zipping the file and serving it as a *.kmz file. It
compresses from 1.2M to 124K which should download much faster.
* Serve the file from a faster or more consistent server. I've found
that Google AppEngine works well for static files.
Regards,
James
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-a...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
time wget -S http://foothill-web-gis.googlecode.com/svn/data/rooms1.kml?randomnumberhere
Looking at the download speed is insufficient as it doesn't take into
account the size of the file, or request latency.
Regards,
James