|
Project 256meg and tab zombification
|
|
Posted by: stak
Tags: mozilla
Posted on: 2012-11-02 15:27:48
The main thing that I'm working on these days is "Project 256meg" (aka bug 792131). The goal of the project, as the name implies, is to get Fennec working well on phones with only 256 MiB of memory. There are a large number of older ARMv6 Android devices out there which have less than the 512 MiB of memory that we currently require for Fennec. Having Fennec run well on these devices would allow all of those people to use it as well.
One of the changes I landed recently was to "zombify" tabs under certain conditions. Zombifying a tab unloads the content loaded in the tab, thereby freeing up most of the memory associated with that tab. The tab itself remains, and remembers the URL it was on, so that when the user switches to it, it will resurrect itself by re-loading the content. The behaviour is quite similar to what Android itself does with activities - it will close activities in the background silently if needed, and open them again if the user switches back to them.
In bug 784040 we added code that zombifies all of the background tabs when we get a low-memory event from the system. In bug 792143 and bug 803575, we added some additional conditions to zombify individual tabs to prevent excessive memory usage before it happens. Specifically, when a new tab is opened, the least-recently-used background tab is zombified, if it hasn't been used in some amount of time (controlled by the browser.tabs.expireTime pref; defaults to 1 hour; -1 to disable). This behaviour is enabled by default on low-memory devices and is turned on dynamically on high-memory devices after we receive the first low-memory event on those devices.
I'm planning to also add some telemetry to see how often these events get triggered in practice, so that we can tune the behaviour as we go. However if you feel like your tabs are getting turned into zombies too often for your liking, let me know (either file a bug or comment here) and we can investigate.
|
|
(c) Kartikaya Gupta, 2004-2024. User comments owned by their respective posters. All rights reserved.
You are accessing this website via IPv4. Consider upgrading to IPv6!
|