minimize-memory.uc.js (tested on Firefox 124.0.2)
Automatically frees browser memory when needed. The function is the same as clicking the Minimize memory usage
button on the about:memory
tab.
Default parameters (edit them as you see fit):
const threshold = 1000; // script is activated only when Firefox uses (megabytes) or more RAM
const minz_limit = 500; // minimize memory when relative RAM consumption exceeds (megabytes)
const poll_interval = 30000; // check RAM consumption value every (milliseconds)
const poll_number = 3; // how many RAM consumption values to aggregate for decision
// must be less than poll_interval
const cooldown_time = 5000; // give (milliseconds) for RAM level to stalilize after minimizing
const debug_beep = true; // sound beep when memory is cleared
const beep_time = 0.1; // beep duration (seconds)
const round_mb = 20; // round RAM values to (megabytes)
xiaoxiaoflood's method
- Unpack firefox.zip into Firefox installation folder.
- Unpack chrome.zip into your Firefox profile
chrome
subfolder.
- Place minimize-memory.uc.js into your Firefox profile
chrome
subfolder. - Restart Firefox, you should have the button to manage scripts with Minimize Memory Usage script already registered there. Make sure script is activated (have check mark).