Using API V3 Loading large amount slower than v2 in Firefox 3??

181 views
Skip to first unread message

ttxstart

unread,
Aug 11, 2009, 3:18:31 PM8/11/09
to Google Maps JavaScript API v3
Hi everyone,

Recently I developed a Web application based on Google map API V2, it
adds about 1,500 markers to the map.The markers have different
category, when the user choose category option, it will show different
option. I use show() and hide() function to display or hide the marker
on the map.
I test in Mozilla Firefox and IE 6, IE7 & IE8, they all work fine,
except the the performance. IE6 & IE7 is way slower than Firefox and
IE8. for example in Firefox and IE8, it takes about 1-2second, like
you turn on/off the switch. for IE6 & IE7, it takes about 50seconds.

So I rebuild the application based on the API V3. I use the set_visible
() function to show or hide the markers on the map. It works better
than V2 api for IE 6 and IE7. it takes about 7-8seconds to show/hide
the marker. it's pretty good.
The problem is it becomes slowly when runs on Firefox, it takes 5-6
seconds. I don't get it.

So does anyone know what's difference here? and Why it becomes slowly
for firefox in API V3?

Thank you

pamela (Google Employee)

unread,
Aug 16, 2009, 7:51:02 PM8/16/09
to google-map...@googlegroups.com
Hi ttxstart-

Perhaps we need to make additional optimizations. Can you share a link to your demonstration site here, so that we can see what you're seeing?

- pamela

Jim

unread,
Aug 17, 2009, 10:52:03 AM8/17/09
to Google Maps JavaScript API v3
Hi,
Thanks for your response. Actually, my map site is Intranet
application, there is no outside link due to the company policy. sorry
for that.
I don't know what's different between set_visible() VS API 2 hide()/
show(), but I like set_visible() performance in IE6 & IE7.

Thank you.

On Aug 16, 7:51 pm, "pamela (Google Employee)" <pamela...@gmail.com>
wrote:
> Hi ttxstart-
> Perhaps we need to make additional optimizations. Can you share a link to
> your demonstration site here, so that we can see what you're seeing?
>
> - pamela
>

bratliff

unread,
Aug 17, 2009, 12:55:25 PM8/17/09
to Google Maps JavaScript API v3
On Aug 16, 11:51 pm, "pamela (Google Employee)" <pamela...@gmail.com>
wrote:
> Hi ttxstart-
> Perhaps we need to make additional optimizations. Can you share a link to
> your demonstration site here, so that we can see what you're seeing?
>
> - pamela

Disabling the hidden static map for large screens will make an
enormous difference. I have a little hack to torpedo it.
Unfortunately, it still requires http activity to terrminate an in-
flight file request. The hidden static map makes V3 almost unusable
for me.

pamela (Google Employee)

unread,
Aug 17, 2009, 5:51:43 PM8/17/09
to google-map...@googlegroups.com
Hi Jim-

Intranet sites require use of the Premier API; all sites using the free API are required to be publicly available. See the terms or FAQ for more info.

We think we've made an improvement to marker loading for the next release, but it would be useful to see your code to see if it improves your particular case.

Bratliff-

In this case, the main performance hit comes from how the markers are created, not from the static map. We will look into your feature request of disabling that, however.

- pamela

Ben Appleton

unread,
Aug 17, 2009, 7:46:17 PM8/17/09
to google-map...@googlegroups.com
For now, try undocumented Map constructor option useStaticMap: false.

> >
>

Lakeuk

unread,
Aug 18, 2009, 9:06:57 AM8/18/09
to Google Maps JavaScript API v3
I've attempted a test of my v2 code using v3 to see what the
performance is like which plots geocache points, I've been using
clearoverlays on v2 but been using a work around posted on here for v3
but not getting the same speed in reloading points.

function clearMarkers_workaroundv3(){
for(var i=0; i<markers.length; i++){
markers[i].set_map(null);
}
markers.length = 0;
}

I've posted an example walkthrough on Screenjelly, first part is using
v3 where is takes around 3 secs to redraw my points, second part is
using v2 where it's almost straight away

http://screenjel.ly/watch/gBmmIeHO8Ws

Dave

bratliff

unread,
Aug 18, 2009, 9:50:14 AM8/18/09
to Google Maps JavaScript API v3
On Aug 17, 11:46 pm, Ben Appleton <apple...@google.com> wrote:

> For now, try undocumented Map constructor option useStaticMap: false.

Thanks very much Ben & Pamela.

It works perfectly. Dragging, panning & zooming performance is
greatly improved for large maps, especially during backtracking to
previously visited tiles but not precisely to the same spot.

I have updated my demos:

www.polyarc.us/polycluster
www.polyarc.us/polycluster/canada.html
www.polyarc.us/polycluster/alaska.html
www.polyarc.us/polycluster/absurd.html
www.polyarc.us/polycluster/east.html
www.polyarc.us/polycluster/west.html

I am still seeing a little bit of http activity. Could it be caused
by the cache expiration date/time of the tiles ?

Please close out issue 1600.

Thanks again.

Jim

unread,
Aug 18, 2009, 10:07:31 AM8/18/09
to Google Maps JavaScript API v3
Hi Ben,

I tried useStaticMap: false, it works better for IE 7 compared to non
using it, but for firefox, there is no bigger difference.

Thanks.


On Aug 17, 7:46 pm, Ben Appleton <apple...@google.com> wrote:

bratliff

unread,
Aug 18, 2009, 3:40:44 PM8/18/09
to Google Maps JavaScript API v3
On Aug 18, 1:50 pm, bratliff <bratl...@umich.edu> wrote:

> I am still seeing a little bit of http activity. Could it be caused
> by the cache expiration date/time of the tiles ?

It is not the cache expiration date/time which is set to one year
out. I am guessing it is a quick transition between transparent.png &
an actual tile contained in cache. Perhaps it is just for cosmetics
to avoid displaying progressively loaded tiles. It is not a big deal
but it does generate http activity which could be avoided.
Reply all
Reply to author
Forward
0 new messages