Re: ideas for returning memory to the OS

smaug <[email protected]> Mon, 17 Dec 2007 00:14:33 +0200
Newsgroups gmane.comp.mozilla.performance
Message-ID <[email protected]>
Michiel van Leeuwen wrote:
> What would this mean for other applications that are based on xul, like 
> thunderbird and sunbird? Those usually have one window that exists for 
> the lifetime of the app. I know that for sunbird, a lot of xul nodes are 
> created and destroyed for displaying calendar data. Would the memory 
> from those nodes never be released anymore (afaik, you can't release 
> individual arena allocations, only the entire arena. Is that right?)

The memory wouldn't get released but recycled. But hopefully we'll get
better arena implementation which could in some cases release memory.

> Related to this: what about tabs that stay open a long time, but do 
> change? for example, webmail. I keep that open all day, but it reloads 
> all day. Would that also mean the memory won't be released?

Reload creates a new arena and the old one gets deleted (after the page
goes out of bfcache). But if the webmail uses XHR or similar to update
the data, DOM nodes are possibly created and deleted and memory gets 
recycled inside the arena.

I checked in the initial patch for the arena for content nodes.
I'm currently running FF+Chatzilla and TB to see how memory usage
behavior changes in long run (trying to run them for a week or so and 
using them for daily work).

-S