by Yoric · 6y ago · 0 comments
I rewrote the Firefox Shutdown so that it actually worked.
I also introduced structured async programming, async testing, async exception reporting in our codebase.
And yes, I do enjoy bragging :)
Every so often, after a system restart due to running out of battery on my laptop, I'd start Firefox and get the dreaded "only one window, home tab".
I was able to recover by going through backups, but it was a fiddly and manual process, and for a while last summer it happened annoyingly often. There were a couple of times I couldn't recover what I'd been working on the previous day.
If you were to tell me to use bookmarks instead of tabs, I'd find that weird: Bookmarks are like a less useful version of tabs. I used to use Bookmarks and found them less useful; it's that simple.
Yes, I do use a plugin that allows better tab management, thanks.
With regard to digging through backups: Bookmarks would have exactly the same problem if they got wiped, would they not.
UPDATE: I'm with jml7c5's comment: There is a middle ground betweem traditional Bookmark use (archived) and live (current issues). My open tabs occupy this middle ground as a kind of medium-term, time-ordered backlog of issues to take another look through when time permits.
Some of them are articles containing information I want to extract to notes, some of them contain specific technical bugs, solutions or discoveries I need to incorporate having found out about them, and generally many serve as useful reminders about some issue or other to get to in due course.
The ability to visually see their time and association structure that grew passively is quite useful, as is the ability to visually see the actual content at a glance, because that helps me remember why that content is in my queue.
Bookmarks are almost useless for this. The URL is not enough by far. If Bookmarks had large thumbnails, retained scroll position, and it was possible to highlight particular text, then Bookmarks would be much more useful for my needs.
No doubt there are various clipping tools such as Evernote that would serve me better. But I haven't found an open source one that hits the spot, and I'm not interested in using any closed source or cloud-based clipping tool, having been bitten by locked away formats, and inability to extend the tool, too many times already.
My painful tab overuse is caused by skimming HN/reddit a few times a day, popping anything I'm interested in looking at into a background tab, then getting to those tabs as I go through the day. It doesn't feel the Pile Of Prospects should be in a "to read" list, as it seems that such a list should only contain long articles & videos & etc that I'm certain I want to read but don't have time for. That is, the "to read" list is meant to be something that could be integrated with a tool like Pocket, where the content could be backed up and read offline while in a continuous, focused state. Rather, the Pile Of Prospects should go in a sort of "haven't looked at yet" list that needs to be pruned and which is always visible so as not to go untended.
I'll probably write an extension to deal with my use case, but I think this slow creep is how most people end up with a thousand tabs open.
I do agree that thousands of open tabs is a terrible way of operating. It's not great for memory consumption (even with tab discarding), it makes hunting through the "real" active set of tabs difficult, and people do end up losing their Pile Of Prospects. I'd love to see Firefox et al gain better support for this without needing to resort to extensions, especially as most extensions designed for this are a touch too slow, have rough edges, or try to do too much.
So I have enabled "Restore previous session" option in firefox and sometime I manually crash the firefox so the next time I open the browser it asks to me restore the 700+ tabs but they won't be consuming the memory because they are inactive and when you click on them, then only it loads the contents and consume memory.
This is how my tabs looks: https://snipboard.io/AUQ3kj.jpg
Also, I use multiple profiles of firefox and having them as separate applications like this: https://snipboard.io/mXUCqp.jpg
PS: I don't use chrome or electron based apps as they are memory hogger.
I'd sugges you need to find an alternative workflow... even one thousand tabs has far passed the point of diminished returns
The other one is that getting file safety correctly is really hard. The OS likes to the developer, the filesystem lies to the OS and the hardware lies to everyone. For most applications, that's not a big deal, but for something that used to run every 15 seconds on hundreds of millions of computers, this can cause data loss. That's why you really want to use a DBMS rather than roll your own format if data safety is critical.
For shutdown, it was also a case of initial architecture not matching the current situation anymore. Firefox was initially a synchronous, single-threaded, single-process architecture, but this had stopped being the case for a few years already. At some point, shutdown needed to be re-architectured, I happened to be the one who managed to convince people that the time was now :)
That reminds me of the case where AWS famously revealed that a single NIC in their ginaromous S3 fleet flipped a single bit once in a while and that caused an outage because their gossip-daemon responsible for fleet health-checks failed spectacularly [2].
Bryan Cantrill's talk on the realted topic of hardware/firmware bugs is pretty good [3].
[0] https://danluu.com/fsyncgate/
[1] https://perspectives.mvdirona.com/2017/04/at-scale-rare-even...
For example, when a Garmin watch runs out of battery during workout (or if a software crashes), the workout always gets saved, and you can resume it when you turn the watch back on.