Reclaim CPU

By joeytwiddle Last update Aug 1, 2009 — Installed 624 times.


Script Summary: Stops Firefox from using up CPU unnecessarily, by removing plugins and disabling javascript timers on tabs which have been left idle. Useful if you have a slow PC, or you like to open 20 tabs and then do something else without closing them.

Script homepage

This is oldware. Chrome and Firefox have got much better at not hammering the processor with activity from background tabs. [Actually this isn't true is it? Perhaps it is websites and AdBlock which have improved!] These days I am using Hibernate Idle Tabs instead, which is more about reclaiming memory.

Anyway...

What Reclaim CPU does NOT do:

- Reclaim CPU does not disable animated GIFs and PNGs. My recommended solution to this is to set image.animation_mode="once" in about:config

- Reclaim CPU will not stop any addons/extensions that run in the browser (not on the page). If you want to debug which of your addons is using CPU, I recommend installing the "XUL Profiler" addon.

How idle detection works:

- If your mouse leaves the page body (or never entered it), then the page is marked as idle. After a page is idle for 30 seconds the cleanup is activated. (You can click to re-active individual plugins, but you can't restart the javascript timers.)

Known issues:

- If you Alt-Tab away from the window (under Fluxbox at least), idle detection is not triggered (no mouseout event is fired).

- If you do not move the mouse at all after loading the window, idle detection will trigger while you are reading/watching the page. You can prevent this by setting beAggressive=false, but this means idle detection will fail if you moved away from the window before it finished loading (before Greasemonkey ran the userscript).

If you have any suggestions for fixing these, please inform the author.