desktop: Tab auto unload not working with recent changes

Preliminary Checks

  • I have read and understood the important section above.
  • I have searched existing issues and avoided creating duplicates.
  • I am not filing an enhancement request.
  • I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

Looks like memory based unloader prevents tabs from auto unloading entirely. No matter how much time passes, tabs in background are always active, switching to them is instant. Even if whole system runs out of memory and starts using pagefile/swap

Expected behavior

Auto unload tabs more agressively (or at all). Also return dim on auto unloaded tabs

Actual behavior

Tabs are not auto unloaded at all

Steps to reproduce

Open few tabs, use them, then leave them in background. After some time switch to them to check if they were unloaded - they were not.

Screenshots and videos

No response

Version

1.12.10b

What platform are you seeing the problem on?

Windows - x64

What component is this issue related to?

Tab unloading

Relevant log output if applicable


About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 28
  • Comments: 70 (4 by maintainers)

Most upvoted comments

Honestly, it’s really frustrating to have your browser auto update and to find such an important feature (auto tab unloading) broken in a minor(!!!) release version.

From release notes:

Automatic tab unloader now uses Firefox’s default tab discarding feature, which is based on time and memory usage, instead of the previous time-only method

  • It’s phrased like only an improvement, which it’s not and it’s obvious to anyone who uses a browser with a dozen of tabs open
  • It’s phrased like a minor feature is being added on top of existing one, instead of a major feature overhaul it actually is
  • Nowhere here is stated that the config param “time after which tab will be unloaded” is removed from the settings page.

And to make matters worse, in this github issue the first response to this problem is “Yeah, that’s how it’s supposed to be - we changed it. If you don’t like it - you can try to change some hidden configuration parameters or manually unload the tabs. Issue closed.”

Am I crazy, or this is not how a release in a major browser should be handled?

  • Minor version releases
  • Huge feature “changes” to borderline being broken (in my own opinion and in opinion of many others in this github issue)
  • Such feature change is poorly described in the release notes and can be detected only if you monitor your ram
  • Issue is not fixed in more than a week after release and is not treated as a major bug that it is

What does he mean - no noticeable harm? This feature is literally not working. Might as well just disable it completely, nobody will notice at this point. Although his attitude to breaking and removing existing features is more than mildly alarming at this point. Take removed icons for example, or new tab button

Auto unloader is still completely broken, honestly if I didn’t have to move the session and reinstall extensions etc I’d ditch Zen right now, because now that Firefox has good support for vertical tabs (arguably better than Zen since I can have the expand on hover without external mods, another feature that was removed because it was “too hard to maintain” apparently) the only real advantage in usability I actually care about are split tabs.

NOBODY asked to change how the unloader works, yet we got this broken mess that for some reason isn’t immediately reverted back to the old system which worked perfectly fine until a fix is found.

Attached, about:unloads to see tabs I haven’t touched in hours that are still active (and the only reason I don’t have anything older than those is that I’m unloading them manually every once in a while).

Image

I am so glad this is discussed on here. Zen is hogging memory and battery juice on my Ubuntu machine like there is no tomorrow. I cannot stress enough how disappointing a big change like this that does not work at all is. In my opinion, a rollback to the previous system is in order, until the “kinks” of the native Firefox system have been ironed out.

Also: Preventing certain tabs from auto-unloading is essential! There are many scenarios where I absolutely DO NOT want the browser to unload or discard my tabs. This is a dangerous breaking change that can destroy the trust and goodwill Zen has gathered really quickly.

And to make matters worse, in this github issue the first response to this problem is “Yeah, that’s how it’s supposed to be - we changed it. If you don’t like it - you can try to change some hidden configuration parameters or manually unload the tabs. Issue closed.”

Changing major defaults like this silently can erode a lot of trust. Lots of gratitude towards those building and maintaining Zen. And if 20 people are trying to figure out fixes in a thread like this, there are probably way more who are silently quitting the browser b/c it’s no longer working for them and they have no idea why. I just randomly stumbled on this thread, and changing the configs fixed it for me - Zen 1.12.10b, macOS 15.5 (24F74) - but I was about to switch to a different browser.

@V0LDY I talked to the Dev on discord and he is not convinced that unloading is a core feature or that this migration causes any noticeable harm. Please make yourself heard. This is an issue hat could be fixed very easily by reverting these changes!!!

Also agree prevent tab unload is essential. Use it all the time and am very annoyed it was removed for no reason.

Zen has changed to the Firefox native tab unloader in v1.12.9b https://zen-browser.app/release-notes/#1.12.9b

Image

More info about its working https://firefox-source-docs.mozilla.org/browser/tabunloader/ Summary: It will only unload tabs when available memory is becoming low but there’s (active) demand for it. It’ll then unload stale/inactive tabs starting with the least recently used ones. It’s no longer simply time based. By default it only considers tabs inactive after at least 10 minutes.

You can monitor which tabs are the first candidates to be unloaded (if free memory is becoming too low) in about:unloads

By default no fading is applied unless tabs have been explicitly unloaded by the user. To enable fading of auto unloaded tabs, set browser.tabs.fadeOutUnloadedTabs to true

To change the minimum inactivity before a tab is considered a candidate for unloading, use the browser.tabs.min_inactive_duration_before_unload config. Set in ms, default 600000 = 10mins.

You can manually unload tabs by selecting one or more tabs and right-clicking:

Image

The removal of this bothers me (I was wondering why my laptop was at 90% memory usage after never reaching that during idle use before — I guess this also explains my desktop’s higher-than-usual memory usage).

I have managed to get it to unload tabs no matter what my memory usage is at by setting: browser.tabs.fadeOutUnloadedTabs true browser.tabs.unloadOnLowMemory true browser.low_commit_space_threshold_percent 100

But it unloads essentials tabs (which the old system did not allow AFAIK) And there is no option anywhere to prevent tabs from being unloaded like there was in the old implementation. I would be happier if there were settings to enable this feature, too, as I thought it had been entirely removed before digging through threads for 2 hours.

Ideally, the browser would automatically unload inactive tabs after a set amount of time. The memory usage-based unloader is not a replacement for the time and activity-based unloader. One is meant to prevent system crashes due to high memory usage and one is meant to keep memory usage low by unloading unused tabs. (at least that’s what the features are to me)

I was considering switching to an older version of the browser before I found those settings as I don’t like my machines to start using swap during idle usage.

I would prefer if the changes were reverted as they do not benefit any of Zen’s users as far as I am aware. I should not have to abuse a setting to get a feature to work in a different way than it was intended to. An OOM-unloader is no replacement for an inactivity based unloader. Both features can be used at the same time, so there’s no reason to remove the inactivity-based one.

Edit: after using the browser with these settings like this for a day, it is getting extremely annoying to have my Essentials tabs constantly unloaded. I much prefer the old behavior. This new behavior is pretty much unusable for me.

@worst-developer You can use “New tab suspender” Firefox extension while native Zen feature is broken. It has time customization as well as some other features like ignoring audible or pinned tabs for unloading. I’m using this extension on mac and it works fine.

But it’s better to not have a feature in the first place than to get it, use it, love it and then have it yanked out.

Tried to get this point across to the dev. A beta normally is supposed to be fairly feature stable and meant for bugfixing / polishing. Adding stuff is easy, but removing or drastically changing things that people have become used to or even ‘dependant’ on… always leads to a lot of friction. Change is difficult, even when it’s for the better (which we can agree this change wasn’t).

Do remember though it’s mainly 1 dev and a few contributors, it’s a beta and all FOSS. It’s also volunteers (with a day time job next to this) trying to help you here / on discord.

I can confirm the same issue on Linux.

It’s not enabled on linux

That explains a lot. The disappearance of Zen’s timer based unloader is a regression for these users, if its replacement does not work.

@mr-cheffy I know we’ve talked about this privately a few times, but I think it’d be good if your stance on returning a time based unloader is shared publicly here as well. Yes, no, maybe later after other priorities? If only to have some answer we can refer to when there’s repeated questions on Discord or other channels.

In short

  • The current Firefox-native unloader only is there to prevent memory ‘panic’ that would cause a system crash. Until system memory runs full it does nothing. < this was not how the replacement was initially understood.
  • Having multiple workspaces and tab folders coming soon ™ more easily leads to having more tabs open. Some of these tabs might act like quasi to-do list and bookmarks.
  • Combining the first two points > Zen can use a lot of memory if you don’t manually unload or clean up tabs. This in itself does not have to be an issue as long as memory is freed up when other active programs require it. Still having many active tabs creates overhead/load, that depending on the computer can have significant enough impact on performance. Especially laptops might suffer more fan spin-up and reduced battery life. Background Eco QoS helps, but only on Windows.

One earlier proposal was https://github.com/zen-browser/desktop/issues/8822#issuecomment-2952655913, but it’s maybe too elaborate and also flawed; simply setting the free memory threshold too high will also cause pins/essential to be unloaded. These are avoided at first, but will be unloaded if really needed to meet the threshold.

Another simpler unloading feature (to the user), but maybe costing more logic to implement:

  • Re-introduce a single “unload tabs after x minutes of inactivity” option field
  • Take the info of the native unloader about:unloads, see SS in this comment and
  • Periodically trigger unload for all tabs (referenced by process ID?) where last accessed is > x minutes ago && where base weight is 0

Using the native unloader’s weighting like this will re-use the logic to preserve tabs that play media / have PiP active while the tab itself might not be.

Same problem on MacOS 15.5… I just started using this extension:

https://addons.mozilla.org/en-US/firefox/addon/new-tab-suspender/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

It’s a shame to stop having the native option of unloading the tabs just for time

Dunno if this is related but additionally, many of my (long-running) tabs are missing the manual unload option as well. On Debian 12 (bookworm), Zen 1.12.10b:

Moreover, where is the do not unload button, or way to control per-tab behaviour as a user?

So to sum up the situation from reading the thread, please correct me if I got anything wrong:

  1. Currently some users can’t manually unload tabs;
  2. We seemingly can’t manually set an exception (an extremely useful feature);
  3. The new (to Zen) system by design wants to hog as much memory as possible because… reasons;
  4. The new system by design introduces confusion about what is happening, and why - see 5. and 6.
  5. If tabs are unloaded by the system, it does not in any way notify you of whether tabs are hibernated or not;
  6. However, if tabs are explicitly unloaded by the user, then it greys out the tab, creating an arbitrary differentiation;
  7. The new system has un-intuitive and somewhat esoteric timing/memory settings that are hidden away;
  8. Changing any defaults will require futzing about in config flags or installing an add-on with useable and tweakable features, just like we used to do on Firefox;

I don’t mean to be a downer, but how is this in any way better than what we had before?

I can’t see ordinary users altering flags, and any user-facing settings have been gutted. So by default it seems Zen will become a memory hog for most users, given the parameters that are set, just like every other browser?

The point of Firefox’s feature seems to be to “to prevent the application from crashing due to insufficient memory when the system’s available memory is low”. I, and I believe many other users, use tab unloading features to prevent a given browser’s memory footprint from getting too high.

Zen’s built-in system allowed for that use-case in a simple and intuitive manner. Firefox’s does not, at least not in any clear and user-friendly way, as evidenced by all the threads on Mozilla and elsewhere complaining about it. If you have to fight with the system to get it to work, it’s not a good system.

Please get the tab unloading behaviour as it was before! We don’t want to wait for our computers to be low on memory for unload to happen. Having a lot of not used tabs also contributes to filling your RAM quickly, it doesn’t make sense.

Just give us a lighter browser and let us configure if we want auto unload after some time, unload if memory is low or disable this feature.

This is the way to go!

We have a confirmation from a Linux user on Discord. They also tweaked the mem percentage setting in such a way that the timer becomes leading:

It worked! I set browser.low_commit_space_threshold_percent to 100, browser.tabs.min_inactive_duration_before_unload to 300000 (5 minutes), and browser.tabs.unloadOnLowMemoryto true, and my tabs unloaded after 5 minutes.

Was wondering why the fans of my MacBook were turned on the last days. Turned out it was because the tabs were not unloaded any more. Installed https://addons.mozilla.org/de/firefox/addon/new-tab-suspender/ my MacBook is silent again.

Turns out that native tab unloading of Firefox really only unloads tabs when the system is close to being unusable, which is really too late.

I believe many people would welcome to have this feature back without having to rely on third party extensions.

This time based Tab Unload option was one of the reasons I switched from Firefox to Zen. All these settings browser.low_commit_space_threshold_percent, browser.tabs.min_inactive_duration_before_unload and browser.tabs.unloadOnLowMemory did not work for me. I am using MacOS 15.5.

True to this day, the only solution is to install 3rd party extension, which is a shame.

i hope the core devs reconsider adding time based tab unloader feature 😕

Valid points, many of which I agree with.

Yesterday I proposed (and now tweaked) a set of unloader related options that would be easier to understand and set than some ‘esoteric’ set of hidden prefs:

Tab Unloader
Free up memory by unloading tabs you're not actively using.

[$1] Enable tab unloader

    Unload tabs that have not been used for: [$2] minutes

    Only unload tabs when system memory usage is above: [$3] %
    (Caution: Memory detection on Linux is buggy. This can lead to tabs unloading while usage is below the set value.)

It translates milliseconds to minutes (pref value = user input*60,000) and reverses the memory threshold logic (value = 100 - input). The memory usage is reversed, because I think people using the unloader want to prevent the memory usage growing too much (and might not care when it’s below a certain level). It also rimes with the time setting: lower = sooner. While the prefs ‘free space threshold’ is: higher value = unload sooner.


Pseudo mapping:

browser.tabs.unloadOnLowMemory = $1 browser.tabs.min_inactive_duration_before_unload = calc($2*60000) browser.low_commit_space_threshold_percent = calc(100 - $3)

Not to be melodramatic, this blunder might be a gamechanger. I’ll give it till the next update.

@bl4ckswordsman Yes, it is. From my reply above:

Summary: It will only unload tabs when available memory is becoming low but there’s (active) demand for it. It’ll then unload stale/inactive tabs starting with the least recently used ones. It’s no longer simply time based. By default it only considers tabs inactive after at least 10 minutes.

And after your edited question: Well thát would be an issue. But how do you know tabs are not unloaded? By default they don’t fade/dim. Where /how did you check? Would of course reopen this issue if it’s indeed not doing any unloading while there’s obvious memory pressure.