Dormancy: Freeing up memory from unused tabs

Dormancy ‘retires’ tabs that have gone unused for a while, freeing up that memory. It then restores the tabs to life when accessed.

While Firefox 9 adds restore-on-demand for users that restore their session by default, many users will never benefit from it. This add-on targets users who don’t restore session, but do have long-running instances of Firefox and many tabs. This might land as a core feature in Firefox 9 (https://bugzilla.mozilla.org/show_bug.cgi?id=675539).

NOTE: This is highly experimental, has only been tested on the Nightly builds, and probably will destroy your session. You’ve been warned.

Tabs are considered inactive when they haven’t been selected in longer than 5 minutes. To change that, set this pref to a value in milliseconds:

* extensions.dormancy.TabDormancyAgeMs

Tabs are checked for inactivity every 5 minutes. To change this, set this pref to a value in milliseconds:

* extensions.dormancy.TabCheckIntervalMs

Known bugs:

  • Awesomebar entry for dormant tabs shows data URI
  • Sometimes dormant tabs have no title and no favicon

EXPERIMENTAL. MAY EAT YOUR SESSION OR DO OTHER BAD THINGS.

INSTALL

Source code


8 Comments on “Dormancy: Freeing up memory from unused tabs”

  1. Wes Kocher says:

    Does it (can it?) exclude app tabs from the dormancy check?

  2. Lozzy says:

    “While Firefox 9 adds restore-on-demand for users that restore their session by default, many users will never benefit from it.”

    Mind elaborating on that line please? I’m a restore by default user and am wondering what this means for me.

    As for dormancy, it’s something I’ve been looking forward to, so I think restoring users are also in that demographic. For me, I am looking forward to being able to not worry about switching to a large Panorama group briefly, since I know that the memory will be recovered soon.

    Though I think 5 minutes is a bit too soon, especially when considering tabs with relevant information in; form data, videos at a particular position etc. I was hoping that this change would just affect inactive tab groups, though I understand the scope needing to be expanded. Would it be reasonable to have the ability to tune dormancy based on whether the tab is in an active group or not?

    • ace says:

      He probably means many users using restore session will not benefit from this extension, because when the tabs are now restored only on demand, there will probably be no long idle tabs.

      It is for users that open many tabs manually (or from session restore without on-demand loading) and leave them open.

  3. Caspy7 says:

    This is good.
    Though heavy tab users will see a particularly significant benefit when bug 681201 is fixed as will it benefit users of this feature.
    https://bugzilla.mozilla.org/show_bug.cgi?id=681201
    (Not-yet-restored empty tabs take a lot of memory)

    Also, 5 minutes to unload seems way too short a time period. I think this will exasperate users straightaway.

  4. pheldespat says:

    Been done already: BarTab https://addons.mozilla.org/en-US/firefox/addon/bartab/

    “BarTab can intercept when tabs are loaded in the background or restored after a browser restart and will only load the content when the tab is actually visited. It also allows you to _free memory by unloading already loaded tabs_, either manually or automatically.”

  5. Joey Makovec says:

    Thank you, I have recently been searching for info about this topic for a while and yours is the greatest I’ve found out till now. However, what about the conclusion? Are you certain concerning the source?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s