News for hackers. Stuff that matters.
Re:Site Isolation in Firefox by korethr on Tuesday May 18, 2021 @01:08PM (#27197737)
When Chrome was new and shiny, I used it for a time. Then, the first time I found myself needing to kill Chrome because it was completely locked up, I found myself staring at a wall of chrome processes in the task list, not knowing which one I needed to kill. At the time, I thought the idea of a separate process for each tab was silly. Though, with Firefox moving towards this model, I guess the engineers at Google were prescient in the correctness of that tradeoff.

I do use a lot of tabs, so I fear I'm going to find myself facing the same problem I faced with Chrome: a site misbehaves and locks things up, crap, which process do I kill? A way of tracking which tab maps to which process would be nice, so the next time I trip over a badly-coded page, I don't have to kill everything just to get my browser to respond again. Lazyweb question to y'all: is there a feature in Chrome or Firefox that can do this (mapping tab/page -> process), or have I just stumbled upon a side-project idea?

Re:Site Isolation in Firefox by pmontra on Tuesday May 18, 2021 @01:19PM (#27197917)
I gave it a try. I opened a new tab to a random website, then went to about:memory

Scrolling down I found a section starting with

> web (pid 1036080)

> Explicit Allocations

> 108.27 MB (100.0%) -- explicit

> ├───45.04 MB (41.60%) -- window-objects/top(https://www.that-random.site/, id=175)

I try to kill that process now, but I post this message first in case I kill the whole browser.

Result: the tab crashed, the browser survived.

> Gah. Your tab just crashed.

> We can help!

> Choose Restore This Tab to reload the page.

Restore did work.

Re:Site Isolation in Firefox by jedberg on Tuesday May 18, 2021 @02:06PM (#27198654)
When a tab freezes, I just pull up activity monitor/top and look for the Chrome process using the most CPU. It's almost always the culprit.

I also like to occasionally sort by memory usage and kill the biggest Chrome processes. Chrome is nice in that it will show you when a process crashed, so what I do is kill the biggest memory hog, and then see what tab crashed. Then I do it again a few times.

This at least tells me which processes use the most RAM over time and should be recycled (Spoiler alert, it's always GMail and then GCal.)

Re:Site Isolation in Firefox by pspdrome on Tuesday May 18, 2021 @01:16PM (#27197865)
Shift+Esc brings out Chrome task manager where you can kill individual tabs/pages by name.
Re:Site Isolation in Firefox by ocdtrekkie on Tuesday May 18, 2021 @01:19PM (#27197916)
Does this work when Chrome is locked up? Usually people go to Task Manager because it's unresponsive.
Re:Site Isolation in Firefox by hutrdvnj on Tuesday May 18, 2021 @01:35PM (#27198187)
It works when 1..n of your tabs are frozen, but the UI is still responsive e.g. you are still able to switch to other tabs. If your chrome is completely frozen i.e. you can't even open the chrome task manager, then you usually have to restart the browser.
Re:Site Isolation in Firefox by Stevvo on Tuesday May 18, 2021 @09:53PM (#27203675)
Chrome does not "lock up", at-least on Windows without extensions. Individual tabs may crash or lock up, but the rest of the interface hasn't done that for a many years.
Re:Site Isolation in Firefox by kbelder on Tuesday May 18, 2021 @01:43PM (#27198298)
Nice!

I suspected gmail was the heaviest thing I regularly had open, but it's good to see the stats.

Re:Site Isolation in Firefox by gourlaysama on Tuesday May 18, 2021 @01:13PM (#27197815)
On Firefox you can go to `about:processes`.

It lists tabs by process, and includes the PID (on Linux; no idea about other platforms). You can also directly kill tabs and processes from there.

Re:Site Isolation in Firefox by dmos62 on Tuesday May 18, 2021 @04:53PM (#27200942)
That's super useful on a resource strapped system. Wish I knew this earlier.
Re:Site Isolation in Firefox by nine_k on Tuesday May 18, 2021 @07:23PM (#27202614)
For a resource-constrained machine, uBlock Origin + Auto Tab Discard save a lot of resources and keep a window with 100 tabs quite usable.
Re:Site Isolation in Firefox by rstuart4133 on Wednesday May 19, 2021 @08:52PM (#27216184)
You should take a look at Firefox's about:about. There are all sorts of goodies in there.

For example, about:compat lists sites they added hard coded work arounds for.

Re:Site Isolation in Firefox by annyg on Tuesday May 18, 2021 @01:11PM (#27197794)
sounds like page "about:processes" in Firefox would be super helpful in this case! you can use it to unload tabs and kill processes.
Re:Site Isolation in Firefox by kakuri on Tuesday May 18, 2021 @02:37PM (#27199099)
Process Explorer (from sysinternals) lists processes as a tree so it's easy to find and kill the root Chrome process. At a glance it looks like all non-root processes have a "--type" parameter given to them. The root process has the simplest command line with only "--remote-debugging-port" being passed.
Re:Site Isolation in Firefox by croutonwagon on Tuesday May 18, 2021 @11:06PM (#27204081)
not a direct resolution but i do use OneTab

https://addons.mozilla.org/en-US/firefox/addon/onetab/

to offload idle tabs. Downside is that it doesnt sync with firefox so anyhing i may need I may need to open in another firefox instance, I just bookmark.

The grouping is nice because it gives me a reference of a time i was doing x research/reading. And what i find is that there really isnt too much that i need to crossover, work stuff stays on my work computer, personal to personal etc.

Re:Site Isolation in Firefox by nine_k on Tuesday May 18, 2021 @07:21PM (#27202584)
Run `top`, sort by CPU or RES, depending on want is overspent.

If Firefox is still somehow responsive, open about:performance and identify the CPU-hungry tab(s), then close them.

Re:Site Isolation in Firefox by slver on Wednesday May 19, 2021 @01:41AM (#27204999)
In chrome when a site hangs its process the browser chrome is still responsive. So you just close the tab.
Re:Site Isolation in Firefox by nfoz on Tuesday May 18, 2021 @01:50PM (#27198391)
> a site misbehaves and locks things up

Why/how can this happen? That sounds like a bad failure of the browser.

Re:Site Isolation in Firefox by carlhjerpe on Tuesday May 18, 2021 @02:34PM (#27199054)
In htop I can see and kill the process tree, I think processhacker2 can achieve the same on Windows.
Re:Site Isolation in Firefox by asddubs on Wednesday May 19, 2021 @07:51AM (#27207319)
if you're on linux you can do killall -9 firefox