If by "directly from a database" you mean that the data ends up being 
included in the HTML, then the additional downside of that is that 
nothing else can start being rendered or fetched until that HTML file 
has been completely fetched. Whereas, if you start with a small HTML 
file, and load the data via an AJAX call, the browser can start 
performing the rendering and fetching other resources (like the Google 
API code and other imagery) while the data is being fetched.

Suppose that your average marker uses 256 bytes of data. Then 10k 
markers takes 2.5Mb. On a 1-megabit connection that's going to take 
something like 25 seconds to load. If that data is in the main HTML 
code, then the browser can't start rendering anything until those 25 
seconds have elapsed and it has a complete HTML file to process.

If you use a small HTML file and have the data in an external file, then 
you can quickly display a "please wait" message, and get the rest of 
your page rendered while waiting for the XML to be fetched.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to