Live data from Hacker News

Tab Unloading in Firefox 93

hacks.mozilla.org

81–90 of 283 posts

Re: Tab Unloading in Firefox 93

#81
post #54
post #44

Earlier quoted context omitted.

I can't speak for the person you're replying too, but I have somewhat similar use cases sometimes, and what you propose isn't really a fix. For instance, when programming, the documentation could be spread out amongst many webpages (like each chapter or each section in a chapter is a separate page). And that might not be the only reference I'm using. And then add in separate pages for examples, too. It's not always p…

If the documentation site is worth its salt it will allow you to download a local html copy or even pdf. I personally haven't seen a documentation site that doesn't let you do this, since its important to store your documentation locally in the event the website goes down (happened to me so its not out of the question).

Often your browser can do this. It's especially easy if you can view the documentation on a single page. Pagination on mostly-text sites is a bizarre habit that's about as necessary as a screensaver.

Re: Tab Unloading in Firefox 93

#82
Kudos to the devs who fixed it. In my c++ project I was trying for weeks to figure out how to release back to the OS the memory that my std::vector was occupying, only to find out that there is no straight forward way of achieving so.

Re: Tab Unloading in Firefox 93

#83
post #76

Earlier quoted context omitted.

My use case may qualify; I have anywhere from 100 to 1,000+ open tabs across three different devices and four browser instances (three Firefoxes, one Chrome) at the peak. But judging from your website it looks like a full browser (presumably built out of Chromium) and not an extension that can be used in any browser, so, ugh.

Fair enough. The browser is built because we think browsers should do a lot more than just tabs and bookmarks, so it wasn't enough to just add an extension (we have many more features that we wanted a well integrated experience around). With that said, there are very few limitations to the browser at this point and it will be eventually open source so feel free to reach out as well!

If you want to be innovative, have a look at the browser history function. There was zero progress, but I don't see a reason why the history should not allow me to browse all currently cached images.

Re: Tab Unloading in Firefox 93

#84

Kudos to the devs who fixed it. In my c++ project I was trying for weeks to figure out how to release back to the OS the memory that my std::vector was occupying, only to find out that there is no straight forward way of achieving so.

Detecting low memory scenarios is surprisingly hard on desktop operating systems, but trivially simple on Android/iOS. Firefox for Android already made extensive use of this feature while desktop Firefox' available memory watcher underwent a lot of changes over the years before becoming fairly reliable.

Re: Tab Unloading in Firefox 93

#85

Earlier quoted context omitted.

Do you have any crash report IDs in your Firefox's about:crashes page? I can check whether a Bugzilla bug report has already been filed for those crashes.

I think that the issue is known, but hard to track. It shows with NVDA and heavy web apps like Twitter and Messenger if they are running for some time. I'm posting here some of the crash ids, but it is likely that they are not representative. When the browser starts to clock up, it locks the screen reader as well and I'm not waiting for the crash, but kill the process with extreme prejudice. I'd be glad to help in an…

Unfortunately those crashes do not appear to be related to low memory scenarios. They seem to be genuine bugs in the screen reader. I think the right bug tracking them is this one: https://bugzilla.mozilla.org/show_bug.cgi?id=1691928

Re: Tab Unloading in Firefox 93

#86

Something surprising I learned recently is that this is an anti-pattern when building an iOS app. iOS has a memory compressor, so if you try to purge resources in a low-memory situation, it can cause memory use to spike as the things you're trying to free get decompressed. The SDK provides a notification when memory pressure is high, so people try to get aggressive and purge their caches and unused assets when that n…

Linux and Android have that too. Called Zram. When using zstd a compression factor of 3.5 on swap memory is common.

Re: Tab Unloading in Firefox 93

#87
post #22

What I want implemented.. Chrome/Firefox whatever... is that instead of unloading and reloading when I go back to the tab I want it to export basically an HTML file and when I click back to that tab, I want it to reload the HTML file instead with some notification/marker that it is a "cached" version. There are times where I'll leave a tab in the background that I don't want refreshed but when it gets unloaded, poof,…

Yeah it would be cool if it saved the state of the page until you manually refreshed it.

Re: Tab Unloading in Firefox 93

#88

Something surprising I learned recently is that this is an anti-pattern when building an iOS app. iOS has a memory compressor, so if you try to purge resources in a low-memory situation, it can cause memory use to spike as the things you're trying to free get decompressed. The SDK provides a notification when memory pressure is high, so people try to get aggressive and purge their caches and unused assets when that n…

Plus, the code to handle that is likely little-used and may have been dumped. Just being able to run the handler that does low-memory handling may pull in things and increase pressure.

Re: Tab Unloading in Firefox 93

#89

Something surprising I learned recently is that this is an anti-pattern when building an iOS app. iOS has a memory compressor, so if you try to purge resources in a low-memory situation, it can cause memory use to spike as the things you're trying to free get decompressed. The SDK provides a notification when memory pressure is high, so people try to get aggressive and purge their caches and unused assets when that n…

Linux and Android have that too. Called Zram. When using zstd a compression factor of 3.5 on swap memory is common.

Apple accelerates this compression in hardware, given that it's on an extremely hot path–especially when the system is under memory pressure.

Re: Tab Unloading in Firefox 93

#90
post #12

> On Windows, Firefox gets a notification from the operating system (setup using CreateMemoryResourceNotification) indicating that the available physical memory is running low. I've longed for such a mechanism in Linux, but I don't think it exists. This should at least be an OS-level signal IMO, though a D-Bus interface could also work. Integrating with one of the recent userspace OOM daemons could be a good idea.

Recent Linux kernels allow you to measure memory consumption from a QoS point-of-view via pressure stall information: https://www.kernel.org/doc/html/latest/accounting/psi.html

This isn't the same thing as detecting how much memory is available because Linux overcommits by default. PSI will tell you when the kernel is swapping too much (depending on the thresholds you set) and from that you can infer the user is running low on memory.

Android's lowmemkiller had an explicit free memory threshold userspace could set to be notified. Starting with Android 11 however it's now using PSI too IIRC.

Post reply on HN