Tuesday, February 23, 2010

Benchmarking Google Maps

Recently I've been building a JavaScript API which wraps the the Google Maps API for both version 2 and 3. Its coming along very well and I've already unified most of the basic functionality into a simple to use API which is kind of a blend between the two versions.

The other day I was building in the marker support when a thought crossed my mind: "Has Maps 3 improved the rendering time for adding Markers to a Map?"

And so I went about setting up a benchmark to test it. It was a very simple test which uses firebug's profiler to monitor the "addMarker()" function call to add 1000 markers to a map. I performed the test identically in both versions of Maps. And the results? Amazing.



























VersionOwn TimeTotal TimeAvg. TimeMin TimeMax Time
213.252ms14684.619ms14.685ms11.756ms238.471ms
39.132ms287.789ms0.288ms0.274ms0.548ms

Well done Google Maps team!

No comments: