Memory leak in IE7

40 views
Skip to first unread message

dbrb2

unread,
Oct 9, 2011, 10:53:34 AM10/9/11
to google-map...@googlegroups.com
I realise this is a bit vague, but I have a mashup that uses streetview and map layers. 
It works fine in FF and Chrome, but in IE7 (maybe later - not yet checked) it seems to 
exhibit a memory leak, resulting in IE giving the "script on this page is running slowly" error

Can anyone suggest what might be causing this? I am using a JSONP call, via setInterval, every 5
seconds...but I don't think that should cause this problem? 

The site lives at: 


Cheers,

Ben

geoco...@gmail.com

unread,
Oct 9, 2011, 11:00:52 AM10/9/11
to Google Maps JavaScript API v3
On Oct 9, 10:53 am, dbrb2 <b...@bbarker.co.uk> wrote:
> I realise this is a bit vague, but I have a mashup that uses streetview and
> map layers.
> It works fine in FF and Chrome, but in IE7 (maybe later - not yet checked)
> it seems to exhibit a memory leak, resulting in IE giving the "script on this page
> is running slowly" error

Why do you think it is a memory leak?

Do you have loops in your code?

IE in general tends to run javascript and render maps slower than
modern browsers.
(I hear that IE9 is better, but I don't like alpha testing microsoft's
software)

-- Larry

dbrb2

unread,
Oct 9, 2011, 11:02:37 AM10/9/11
to google-map...@googlegroups.com
I thought it was a memory leak (may be wrong) because looking at the process manager whist running the site in IE, the memory in use can be seen to ramp up and up over time (assuming I clear the "are you sure you want to continue" dialogues when they appear) 


dbrb2

unread,
Oct 9, 2011, 11:03:22 AM10/9/11
to google-map...@googlegroups.com
...I do have one loop that runs on page load to add some markers, after that it is just a setInterval every 5 seconds 

geoco...@gmail.com

unread,
Oct 9, 2011, 11:36:59 AM10/9/11
to Google Maps JavaScript API v3
On Oct 9, 11:03 am, dbrb2 <b...@bbarker.co.uk> wrote:
> ...I do have one loop that runs on page load to add some markers, after that
> it is just a setInterval every 5 seconds

Have you tried using setCenter rather than panTo?
Have you tried making the interval longer than 5 seconds?

What processing runs every 5 seconds? Is it just the getData/plotme?

-- Larry

dbrb2

unread,
Oct 9, 2011, 11:44:49 AM10/9/11
to google-map...@googlegroups.com
Yes

Both run on page load, then after that it is just getData (which gets data via JSONP) , which then calls plotMe via the jsonP callback which moves the map marker and also moves the streetview to the nearest available position 
Reply all
Reply to author
Forward
0 new messages