News for hackers. Stuff that matters.
Re:Ubuntu: “How are we improving Firefox snap performance?” by johnchristopher on Saturday September 03, 2022 @11:53AM (#32703056)
> More importantly, apt would update a running Firefox which you can restart later.

That hasn't been my experience on Ubuntu for a while. Regularly when updating opening new tabs will display a "just one more thing to do" dialog prompting me to restart firefox. On debian 11, if an update took place firefox will sometimes keep working in a kind of degraded mode (inspect tools don't work for instance) until restarted.

edit: at the moment I can't use netflix until restarted but I don't want to restart because I have a private window with tabs I want to read later.. Sigh.

Re:Ubuntu: “How are we improving Firefox snap performance?” by hotpotamus on Saturday September 03, 2022 @12:02PM (#32703177)
Things like this are the reason I stopped believing that software improves. Now I think it just evolves - and I think of evolution in the biological sense in that it's just a random walk without any intention behind it.
Re:Ubuntu: “How are we improving Firefox snap performance?” by mort96 on Saturday September 03, 2022 @12:47PM (#32703634)
FWIW, the reason it used to work in the case of Firefox is that Firefox used to have only one process responsible for all tabs. This would mean that if any tab caused the browser engine to crash, all of Firefox would crash, and it meant that if there was a sandboxing bug, any tab could spy on any other tab.

The reason it no longer works is that tabs run in separate processes. This means that if a tab causes the engine to crash, only that crash (or a small number of tabs) crashes, while Firefox itself and all other tabs keep working, and if there's a sandboxing bug, you still have process isolation which prevents one tab from spying on another. But it also means that if you replace the binary without restarting Firefox, the parent process and the content process will be different versions and they can't really talk to each other.

Software engineering is all about trade-offs. We get improved performance, improved security and improved reliability, and we pay with increased memory usage and a less smooth upgrade process. Personally, I'd say that's a clear improvement.

Re:Ubuntu: “How are we improving Firefox snap performance?” by yjftsjthsd-h on Saturday September 03, 2022 @01:27PM (#32704074)
Does Chrome, which has been made of many processes since day one, have the same problem?
Re:Ubuntu: “How are we improving Firefox snap performance?” by mort96 on Saturday September 03, 2022 @01:50PM (#32704283)
This comment (https://news.ycombinator.com/item?id=32702062#32703005) from this thread links to this post: https://neugierig.org/software/chromium/notes/2011/08/zygote...

TL;DR: right after launch, Chrome forks off a helper process which is then responsible for forking off child processes, so that all child processes use the same process image as the main Chrome process. It also opens all files it will need right after launch and just re-uses the same file descriptors, so it always keeps references to the old files. This is complicated and brittle and a source of bugs, but when everything works and nobody makes a mistake, it means the old Chrome can keep running without problems even after all its files have been replaced with those from a new Chrome.

At least that's how it worked in 2011 according to Evan Martin.

Re:Ubuntu: “How are we improving Firefox snap performance?” by johnchristopher on Saturday September 03, 2022 @12:17PM (#32703324)
I have another funny one: on my Debian install I use transmission. I installed Deluge because Transmission still mixes destination dir from one session to the other. Now when I right click open folder for a torrent it launches vs code with that folder as a workspace.
Re:Ubuntu: “How are we improving Firefox snap performance?” by matkoniecz on Saturday September 03, 2022 @12:04PM (#32703189)
> evolution in the biological sense in that it's just a random walk without any intention behind it

there is plenty to complain about modern software but "random walk without any intention behind it" is neither fitting nor in any way true nor helpful diagnosis

Re:Ubuntu: “How are we improving Firefox snap performance?” by hotpotamus on Saturday September 03, 2022 @12:12PM (#32703271)
As a user of software, that's what I've come to believe. Maybe individuals have intention of the software they write and the systems they create, but as an ecosystem, it doesn't feel like we're going anywhere in particular anymore.