It is just two more weeks before Firefox 105 Stable will be released by Mozilla. The web browser comes with an interesting change that will reduce the number of out-of-memory crashes on Windows machines significantly.
Revealed by Gabriele Svelto on Twitter, Firefox on Windows will soon run into fewer out-of-memory situations that result in crashes.
The linked bug report on Bugzilla, Mozilla’s bug tracking website, offers insight on what Mozilla did to achieve this. Opened more than a year ago, work on it has completed in late August of 2022.
On Linux we have a way to instruct the OOM killer to reap the content processes before the main process when the memory is tight. While we don’t use this yet it’s something that’s feasible. On Windows however there’s no such mechanism because there’s no overcommit support nor an OOM killer, and we’ll be crashing processes on our own when memory gets tight.
The main idea behind the improvement is to delay the killing of the main Firefox process when the browser is running out of memory. With the patch in place, content processes will likely be killed to free up memory before the main process is touched. It is still possible that there is not enough memory that can be freed by killing content processes, but the chance that the main process is touched is reduced thanks to the improvement.
With the main process surviving more the out-of-memory situation, Firefox itself won’t crash completely in those situations. A content process, which may be a website open in a browser tab, may be killed, but it is easy enough to reload it when it needs to be accessed again. Mozilla is offloading crashes to content processes whenever possible when the Windows system is running out of memory.
The number of out-of-memory crashes on Windows dropped significantly in Firefox Nightly after the patch was introduced. Content processes, on the other hand, crashes more, but that was to be expected.
Beta and Stable data will likely be similar, but it is too early to tell. Still, if Firefox 105 Stable sees a similar reduction as the Nightly version of Firefox, crashes on Windows that are caused by low memory situations will be reduced significantly.
Now You: when was the last time you experienced a browser crash?
Thank you for being a Ghacks reader. The post Firefox 105: number of out-of-memory crashes significantly reduced appeared first on gHacks Technology News.