A few more bits of advice:
- create the KML file once every 10 seconds, not in response to a query. You're always likely to have more users than iterations.
- use a zip tool to create the appropriate kmz file from the kml to lower bandwidth and server load (foo.kml, unzips to doc.kml + any dependent images).

In your case, were you to add a custom icon, host it separately (rather than inside the kmz) and reference by URL and GE should only fetch the icon once.