this post was submitted on 06 Sep 2023
4 points (75.0% liked)

Firefox

17865 readers
8 users here now

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

founded 4 years ago
MODERATORS
 

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 10 comments
sorted by: hot top controversial new old
[–] boothin@artemis.camp 4 points 1 year ago (1 children)

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 -1 points 1 year ago (1 children)

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

[–] Atemu@lemmy.ml 2 points 1 year ago (1 children)

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 -1 points 1 year ago (1 children)

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 1 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.

[–] kevincox@lemmy.ml 1 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.

[–] mojo@lemm.ee 0 points 1 year ago* (last edited 1 year ago) (1 children)

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 1 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 -1 points 1 year ago (1 children)

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.