269
submitted 1 year ago* (last edited 1 year ago) by AlmightySnoo@lemmy.world to c/firefox@lemmy.ml

The feature is called Tab Unloading, and weirdly enough they made it not easy to access despite its usefulness.

You basically have to type about:unloads in the address bar and hit enter. If you then click on "Unload", it will put the least used tabs to sleep. If you keep clicking that button until it's greyed out, you'll have unloaded all your tabs from memory.

This feature is handy if you want to temporarily switch to something that is memory hungry without having to close your 100 tabs.

top 50 comments
sorted by: hot top controversial new old
[-] boothin@artemis.camp 109 points 1 year ago

Your Firefox should be doing this automatically when it detects the system needs more memory. You shouldn't need to do it manually in almost any case

[-] Eggymatrix@sh.itjust.works 19 points 1 year ago

Your OS should do this automatically, your programs shouldn't worry about cold memory.

[-] breakingcups@lemmy.world 58 points 1 year ago

Your OS can't decide when a tab is inactive though, given that they can run code, play media, etc. at arbitrary times.

[-] lemmyvore@feddit.nl 15 points 1 year ago

Firefox can't either, because pretty much any page today will have JavaScript running.

The only way it works is to force tabs that haven't been opened in some time to unload regardless of activity... but that's something that the vast majority of users would not appreciate. For power users there are a ton of "tab unloader" add-ons that do this.

[-] BlueKey@kbin.social 3 points 1 year ago

maybe @Eggymatrix ment swapping.
The OS tracks which memory-pages are used least and will swap them out when active programs need more ram than available.

[-] Atemu@lemmy.ml 5 points 1 year ago

Swapping anonymous pages is an extremely poor "solution" to cold memory. It's the big hammer approach that technically always works but isn't optimal for ...anything really. That's the best the kernel can easily and quickly know however which is why it's done at all.

It'd be much better if the process could shave off memory usage using its own domain knowledge. In the example of firefox, it's much faster and less jarring to the user to have 10 tabs reloaded from the web (browser shows a spinner as usual, doesn't lag) rather than swapped back in from disk (entire browser lags and it probably even takes longer).

There's no reliable mechanism to signal any of this to me knowledge however, so processes must guess the right time to do discard memory pre-emtively.

[-] Eggymatrix@sh.itjust.works 0 points 1 year ago

I believe you are mistaken, there is no way that reloading a tab from the web is faster than it being read from the disk.

[-] Atemu@lemmy.ml 2 points 1 year ago

For this you have to know that what gets swapped to disk is not the static content that you'd load upon opening a website, it's the entire memory used by the tab.
Static web content is usually kilobytes to megabytes and is also largely cached (on disk even). A tab's memory usage OTOH ranges from dozens to hundreds of MB.
Even a fast drive needs quite a long time (in computer terms) to load something like that, especially given that the access is likely not sequential and has a low queue depth.

[-] julianwgs@discuss.tchncs.de 2 points 1 year ago

Edge does this very aggressively and I hate it… Also I believe that Chromium based browsers use more memory per tab, so that might be the reason why it feels more aggressive. Firefox does this very rarely.

[-] Atemu@lemmy.ml 4 points 1 year ago

Nope! Not happening or at least not soon enough. Neither on macOS or Linux (can't speak for the stupid platform).

Firefox will happily keep tabs open, even if macOS reports major memory pressure or Linux needs to invoke the OOM killer because it's Gigabytes into swap.
Not to speak of what happens before memory pressure is reached; Firefox will also happily use all of your memory even if you'd rather have it free for something else you're going to do next.

[-] mojo@lemm.ee 64 points 1 year ago* (last edited 1 year ago)

Firefox does this automatically to prevent crashing. There's no real reason to unload tabs manually. If your operating system or Firefox needs more memory, then it will unload the tabs automatically. Unused ram is wasted ram, don't be scared by ram usage going up. It gets freed on demand.

[-] Redjard@lemmy.dbzer0.com 3 points 1 year ago

There are reasons, and there are addons that allow you to unload tabs via their right click menu.

For me it is a way to keep tabs in a window for organization without them using cpu. In some sense it's like replacing tabs with bookmarks that integrate into the browser like tabs.

[-] hemko@lemmy.dbzer0.com 18 points 1 year ago

Just close unused tabs smh

Can't understand people who're juggling 100s of tabs

That's fine, do what works for you. I usually have 50+ tabs open, sometimes >100. I'm a software dev, so I'll typically have the following:

  • a dozen or so JIRA tickets
  • a dozen or so GitHub PR tabs
  • a dozen or so documentation tabs
  • several background tabs with stuff in listening to (usually music or streams)
  • several SM or news pages (for breaks)

When I finish a project, I'll close everything and start it all over again. I basically use tabs as a mixture of to-dos and bookmarks, but only for things I need in the short term.

My personal computer usually only has 20 tabs or so, mostly with gaming wikis or shopping pages.

It works well for me.

[-] JohnDClay@sh.itjust.works 8 points 1 year ago

Especially for school, I would have 10 to 15 tabs open per research rabbit hole. With lots of different assignments due, I'd have maybe 3 or 4 of these going at a time. It's much easier to keep them open than to bookmark them and try to find them later.

[-] Redex68@lemmy.world 6 points 1 year ago

Personally I use simple tab group that allow you to separate tabs into groups that you can open in different windows. It's extremely useful but it means sometimes if you switch between multiple tab groups you might have a lot of tabs open, but using this would allow you to majorly mitigate that problem.

[-] XpeeN@sopuli.xyz 6 points 1 year ago* (last edited 1 year ago)

I just say eh this one is important but I can't rn so I'll deal with it later. Anyway, 60 tabs waiting for me on FF Android. Idk how much I tabs are stashed on PC lol. ADHD struggles are real

[-] PixxlMan@lemmy.world 4 points 1 year ago

(i had over 2000 earlier)

[-] HaggierRapscallier@feddit.nl 1 points 1 year ago

Or use oneTab.

[-] Nioxic@lemmy.dbzer0.com -4 points 1 year ago

They cannot juggle 100 tabs.

Simple as that

Its not possible to manage for anyone.

Theyre just too dumb to close them

[-] QuazarOmega@lemy.lol 2 points 1 year ago

Never have I been so offended by something I 100% agree with

load more comments (1 replies)
[-] kevincox@lemmy.ml 12 points 1 year ago

I use this extension: https://addons.mozilla.org/en-US/firefox/addon/discard/ which provides an option in the context menu for tabs to discard them. I don't use it often but it can be helpful if your browser is slowing down.

[-] calcopiritus@lemmy.world 10 points 1 year ago

I would like the opposite though. When I used chrome, my WhatsApp web tab would load even if I didn't open it, so I still got notifications. In Firefox I have to manually switch to that tab every time I open it.

[-] martini1992@lemmy.ml 19 points 1 year ago

I find pinning my WhatsApp tab sorts that out, it seems to autoload pinned tabs into memory on launch.

[-] calcopiritus@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

If this works, THANK YOU. It's been annoying me for so long.

EDIT: it does work.

[-] Creat@discuss.tchncs.de 10 points 1 year ago

"Auto tab discard" is the name of the add-on I use that also uses this functionality. Highly configurable for automatic discarding (based on total count for example), and also allows manually discarding with a click (or shortcut, I think).

[-] madwifi@lemmy.world 10 points 1 year ago

addon Tab Suspender does this automatically

[-] profilelost@discuss.tchncs.de 9 points 1 year ago

I use the addon Sideberry (for vertical tabs) and it brings the option to unload specific tabs with it's context menu.

I don't get why about:unloads doesn't let the user decide which specific tabs they want to close.

[-] vox@sopuli.xyz 8 points 1 year ago

use auto tab discard.

[-] cy_narrator@discuss.tchncs.de 6 points 1 year ago

Hey thanks for sharing

[-] charonn0@startrek.website 5 points 1 year ago

Where does it get unloaded to?

[-] AlmightySnoo@lemmy.world 8 points 1 year ago

From what I understand it basically just saves the minimal state possible (URL, form inputs), which is lighter than keeping all the rendering details in memory, so maybe that minimal representation still stays in RAM as its footprint would be negligible.

[-] Belazor@lemmy.world 2 points 1 year ago

It doesn’t save form inputs because when you click a suspended/unloaded tab, it reloads the whole page. Everything unsaved on that page is lost.

I really hope some day Firefox will work the way you say, though.

[-] AlmightySnoo@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

That's weird then, because this says:

The tab’s scroll position and form data are restored just like when the browser is restarted with the restore previous windows browser option.

If it doesn't do that then I'd say it's a bug?

[-] Sebbe@lemmy.sebbem.se 5 points 1 year ago
[-] kevincox@lemmy.ml 5 points 1 year ago

It gets thrown away. When you go back to the tab it will effectively reload.

(It will attempt to save some extra information such as scroll position and form inputs but this isn't 100% reliable so I would treat it as a nice-to-have not something to rely on.)

But how else am I going to use up all 64GBs of ram?

[-] wagoner@infosec.pub 4 points 1 year ago

Huge missed opportunity to name it Diet Tab...

[-] WhoRoger@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

IceRaven, Android FF fork, has this feature as an option, and it's very cool when using permanent private browsing mode. It makes it less likely that the OS will kill the browser in the background.

[-] echodot@feddit.uk 2 points 1 year ago

I'm pretty sure that Chrome does this automatically. When I work I usually need about 98,000 tabs open at a time and often I don't actually click any of them but I need them.

Anyway I will often open a tab and have to wait to it for it to load. But I've played around with it and I don't seem to be able to get consistent results so I'm not sure what parameters it's using.

[-] dataprolet@lemmy.dbzer0.com 7 points 1 year ago

What the hell are you working?

[-] anisphia@ani.social 5 points 1 year ago

Research :clueless:

[-] echodot@feddit.uk 3 points 1 year ago

Right now?

  • Internal ticket tracker
  • Internal knowledge base system
  • OneNote with the actual knowledge base system because the knowledge base is never updated
  • Corporate emails
  • Client emails
  • Spam messages blocking system
  • Shift timetables
  • Engineer to English random acronym guide. Unless you know what ROD means.
  • O365 files
  • O365 online Word document
  • Software phone app
  • YouTube
  • PC parts picker website
  • Steam website
  • UPS live chat
  • Lemme

So a fair few. Although I can probably close the UPS live chat tab because I'm getting nowhere with these idiots.

[-] dataprolet@lemmy.dbzer0.com 1 points 1 year ago

This reads like the dystopia in which every piece of software got replaces by a proprietary web application by some evil mega corp. What you need is at least a mail client and a word processor.

[-] Carighan@lemmy.world 3 points 1 year ago

Firefox also does this automatically, and you're not supposed to mess with it.

load more comments (2 replies)
load more comments
view more: next ›
this post was submitted on 06 Sep 2023
269 points (97.2% liked)

Firefox

17303 readers
95 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS