On Dec 11, 7:37 pm, DeirdreH <[email protected]> wrote:
> By removing the overlay and re-creating it? For some reason, I had the
> impression that doing that was also problematic for IE--that it didn't
> deallocate properly when you removed and recreated a tile layer
> overlay. But I guess I am in a position to test that. :)

IE is unable to unwind circular references in the DOM.  If you have no
circular references, I believe the garbage collector will work without
memory leaks.

You might reconstruct an IFRAME with your state information in the
parent frame.  Except for the prospect of memory leaks, you might
alternate between two DIVs - one visible - one hidden.

I am not using Google's API for animation.  I have a home grown tile
stitcher.  It has no circular references in the DOM, a known cause of
memory leaks.  It is illegal but it is just a toy.  Pam has never
complained.

> And talking about destroying/recreating the DOM elements from scratch:
> yeah, I was considering say, setting a timer for an hour and if the
> page was still open, switching quickly to another page on the site,
> then back to the map page, in order trigger the api unload function
> and try to clean up the DOM. I'm been hesitating on that approach
> because it's going to be a PITA to retain the state from the map page->other 
> page->map page. Got to make it flexible enough to maintain the
>
> center lat/lon, the zoom level, the options and (if applicable) the
> open infowindow. But I have seen issues with the unload function
> appearing not to clean up memory either.
>
> Deirdre
>
> On Dec 11, 1:11 pm, bratliff <[email protected]> wrote:
>
> > DeirdreH wrote:
> > > Website here:
> > >http://www.lakecountypassage.com/index3.html
>
> > > We have a wms server providing map tiles to overlay on a Google base
> > > map. These tiles reflect current congestion data, and that data is
> > > updated about every 2 minutes.
>
> > > About every 2 minutes, we have a periodic Ajax function that requests
> > > updated incident/roadwork/har data from the server. That response
> > > sends us a js fragment with the new icon array, a call to update the
> > > icons, and a call to our tile refresh function. I see it hit our
> > > refresh function, which calls the google-provided refresh on the tile
> > > overlay. And . . . according to both Firebug and my packet sniffer,
> > > nothing happens.  These tiles have the cache-control header provided
> > > by geoserver, (Cache-Control       max-age=0, must-revalidate). They do 
> > > not
> > > have the older pragma no-cache header because I have been unable to
> > > work out a way to make it happen.
>
> > > If I add a random number to the tile request, we do get refreshed
> > > tiles. But, the memory leak caused by big image files heading into the
> > > cache (of both IE7 and FF2) every 2 minutes kills the browser in about
> > > an hour on your standard desktop.
>
> > It may be memory fragmentation caused by the garbage collector.  I had
> > a similar thing happening in a flight simulator.  Reallocating
> > obsolete tiles was counterproductive.  If I rebuilt DOM elements from
> > scratch, it improved animation performance & eliminated crashes.  I
> > repeated the operation again every one thousand tiles.
>
> > The browser is a black box.  Unfortunately, it provides no indication
> > of the state of the memory pool.  You may have a lot of little chunks
> > with nothing large enough for another tile.  It may require an entire
> > image to fit into a single contiguous chunk.  It may not be smart
> > enough to combine physically adjacent chunks.  It may use the first
> > fit rather than the best fit.
>
> > Occasionally cleaning house seems to help.  You might try rebuilding
> > your tile overlays periodically.  A massive infusion of memory into
> > the garbage collector may force it to reorganize its memory pool.  It
> > appears to have worked in my case.
>
> > > One of our requirements is that this
> > > page needs to remain open & updating indefinitely.
>
> > > Am I using the tileoverlay refresh command incorrectly? Is there
> > > anyway to make IE and FF update these tiles without making the browser
> > > think that it's a different filename each time around?
>
> > > Thanks,
> > > Deirdre
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to