Open AJolly opened 1 month ago
Please clarify what you mean by "the memory reaches a certain level".
The existing feature in number.mjs:
It doesn't seem to trigger on active tabs. Admittedly debugging's a bit annoying, since the log function doesn't store the line where the log was triggered from.
// is the tab using too much memory, discard instantly
if (prefs['memory-enabled'] && meta.memory && meta.memory > prefs['memory-value'] * 1024 * 1024) {
log('forced discarding', 'memory usage');
discard(tb);
continue;
}
//it doesnt discard because of this.
// in case the tab is not excluded by the initial query
if (tb.active) {
log('discarding aborted', 'tab is active', tb);
exceptionCount += 1;
icon.reset(tb);
continue;
}
It'd be really useful to be able to discard active tabs if the memory reaches a certain level, not just background tabs. I frequently have lots of "active tabs", but not active windows, if that makes sense.