this post was submitted on 17 Jun 2024
34 points (62.5% liked)

Firefox

17823 readers
100 users here now

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

founded 4 years ago
MODERATORS
 

Hi, Once in a while I try to clean up my tabs. First thing I do is use "merge all windows" to put all tabs into one window.

This often causes a memory clog and firefox get stuck in this state for 10-20 minutes

I have recorded one such instance.

I have tried using the "discard all tabs" addon, unfortunately, it is also getting frozen by the memory clog.

Sometimes I will just reboot my PC as that is faster.

Unfortunately, killing firefox this way, does not save the new tab order, so when I start firefox again, it will have 20+ windows open, which I again, merge all pages and then it clogs again !

So far the only solution I have found is just wait the 20 minutes.

Once the "memory clog" is passed, it runs just fine.

I would like better control over tab discard. and maybe some way of limitting bloat. For instance, I would rather keep a lower number of undiscarded youtube that as they seem to be insanely bloated.

In other cases, for most website I would like to never discard the contents.

In my ideal world, I would like the tabs to get frozen and saved to disk permanently, rather than assuming discard tabs can be reloaded. As if the websites were going to exist forever and discarding a tab is like cleaning a cache.

(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 4 months ago* (last edited 4 months ago) (2 children)

Have you tried increasing the size of your swap memory in windows? Otherwise known as "virtual memory". Depending on the speed of your drive and available space, you might be able to increase the vertual memory size to get more performance.

But what about using a page archiving service, even a self-hosted one, like Shiori. Shiori has an extension that can allow for single click page archiving right from the browser. The pages are saved as html files or txt files and it will create a readability version of the file which is just the text and images. You could then search the files and their contents using something like VS Code to search the whole directory where the files are stored. There are plenty of other ways to do that search once you have those archives, though. I think even Windows File Search will search the contents of a txt or html file stored on the device.

Shiori also has its own search, which is pretty fast, and searches the contents of the archives as well.

[–] [email protected] 2 points 4 months ago

I came to suggest the same. This looks like either swap mem is completely disabled or that the extension OP is using can’t handle the function they’re trying to do.

load more comments (1 replies)
[–] [email protected] 5 points 4 months ago

Why do you need so many open tabs to begin with? What is your usecase?

[–] [email protected] 4 points 4 months ago (1 children)

i use auto tab discard and it works great

load more comments (1 replies)
[–] [email protected] 4 points 4 months ago* (last edited 4 months ago) (1 children)

Sidebery (FOSS, MIT license) has several features that could be used to help you merge thousands of tabs into one window without choking out your memory usage, and generally makes it really easy to organize a massive amount of tabs. It would take several steps. First, you'd right-click the panel (the top-level organizational unit in Sidebery, above the tabs) on each window and select Save to bookmarks (example folder structure: selecting Bookmarks Toolbar/merge/ for a panel named panel1 would save the tabs under Bookmarks Toolbar/merge/panel1; click a folder twice in the selection dialog to expand it). Then you'd close that window and repeat with each window, being careful with the panel names so as not to overwrite any other window's tabs. Once you're down to one window, create an empty panel, right-click it, and select Restore from bookmarks. From this dialog, selecting the top-level folder that all the other bookmarked panels reside in (Bookmarks Toolbar/merge/ in this example) will import every tab from every window that was bookmarked, grouped by the window name.

When Sidebery imports a panel from bookmarks, the tabs are imported in an unloaded state, so they have basically no effect on memory until you actually click into them and load them. I can restore about 50 tabs per second from bookmarks without my system even slowing down, taking me from 0 to 500 tabs in about 10 seconds. It's not exactly a one-click option, but I wager it will be significantly faster and less prone to completely breaking than your current workflow, and a little easier to back up (even if window/session states get wonky, bookmarks sync pretty much instantly).

Once your tabs are all in the same window, you can load tabs you want loaded by selecting a bunch (ctrl-click, shift-click, etc., just like in file explorer) and refreshing them, presumably avoiding YouTube tabs (should probably download those with YT-DLP anyway if you want to keep them). Sidebery will actually limit how many tabs it reloads at once, so it'll never choke out your system by trying to instantly load a thousand of them (unlike if you select "open all in tabs" in Firefox's native bookmarks context menu... eurgh). Even if it isn't faster (though I suspect it is) the browser is at least usable while that's going on. I'm not sure how well this method preserves containers, mainly because I don't use them, so if you do, keep an eye on that if you test it out. All I know for sure is Sidebery supports reopening a tab in a new/different container because that's in the default context menu.

There's more time savings than just window merging and tab loading, there's the tree-style viewing, being able to collapse whole trees of tabs you aren't actively paying attention to, seeing the full titles of 30-40 tabs at a time, no more sideways scrolling, a built in search bar to filter shown tabs by title, fully customizable keyboard shortcuts and context menus... it's actually incredible how much this addon can do, and not only does it have a lot of settings and customization that should let you tailor its behavior to exactly how you want it, you can even sync its actual settings through Firefox! (just make sure to set your device name) Only thing it can't do is remove the tab strip to give you more vertical real estate, but Mozilla might be working on that.

I know what it's like to be attached to a cumbersome workflow. I hope this can help streamline things for you a bit and make life with ~2,000 tabs just a little less troublesome.

[–] [email protected] 2 points 4 months ago

Yeah I was going to suggest sidebery as well, but not because of the window merging stuff. It just makes handling thousands of tabs much easier. I’m pretty sure that OP’s problem is the add-on he is using can’t handle his workflow and that it has absolutely nothing to do with Firefox. Because I can drag and drop several hundred tabs from one FF window to another in sidebery without ff even so much as sneezing.

[–] [email protected] 4 points 4 months ago

You are manually caching web content. Were you aware that (a) your browser does that for you; (b) the internet does that for you ?

I'm as guilty of this as anyone and can tell you from experience that it's sutpid.

[–] [email protected] 3 points 4 months ago

Install Onetab

[–] [email protected] 3 points 4 months ago (1 children)

I tend to have ~10,000 tabs because I obsessively fail to clean up. But it never takes much memory or cpu, my PC isn't amazing yet Firefox is always lightning quick.

I've never used the discard or merge windows features though, I can see why those might cause issues. I assume these two functions just aren't optimised for so many tabs.

One addon I might recommend to help keep numbers down is Duplicate Tab Closer, which has options to specify how similar tabs can be to be considered duplicates, and also will detect across all open windows if desired.

load more comments (1 replies)
load more comments
view more: ‹ prev next ›