tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index.rst (2670B)


      1 Tab Unloading
      2 =============
      3 
      4 Tab Unloading is a feature that automatically unloads tabs to prevent Firefox
      5 from crashing due to insufficient memory when the system’s available memory is
      6 low.
      7 
      8 The feature consists of two parts: memory pressure detector and tab unloader.
      9 When the memory pressure detector detects a low memory situation, it triggers
     10 the tab unloader that prioritizes tabs and chooses a tab to unload, or if there
     11 are no unloadable tabs, triggers the internal memory-pressure warning allowing
     12 the browser’s subsystems to reduce their memory use.
     13 
     14 There are two modes to prioritize tabs.
     15 
     16 Firefox basically unloads tabs in least-recently-used order, excluding
     17 tabs playing media, using Picture-in-Picture, or using WebRTC.  Pinned
     18 tabs are deprioritized and are less likely to be unloaded.
     19 
     20 When there are more tabs opened, in most cases when there are more than
     21 eleven tabs, Firefox does extra calculations identifying processes hosting
     22 tabs and estimates memory usage of each tab, and then unloads tabs with
     23 larger memory and more processes that will be terminated by tab unloading.
     24 
     25 You may disable the feature by setting the preference
     26 ``browser.tabs.unloadOnLowMemory`` to ``false``.
     27 
     28 about:unloads
     29 -------------
     30 
     31 The about:unloads page shows how Firefox prioritizes tabs and which tab will
     32 be unloaded when the tab unloader is triggered.  You can trigger tab unloading
     33 manually by clicking the **Unload** button in the page.
     34 
     35 The page contains a table where existing tabs are displayed in the same order
     36 used by Firefox to choose the next tab to unload.  When you click the button,
     37 a tab shown in the first row, which has the lowest value in the **Priority**,
     38 is unloaded.  If the value of **Priority** is a hyphen (-), the corresponding
     39 tab is not unloadable.
     40 
     41 In the first of the two modes mentioned above, Firefox calculates **Last Accessed**
     42 and **Base Weight** for each tab and orders tabs by those values, not calculating
     43 the other attributes such as **Secondary Weight** to save CPU power.  Below is
     44 an example of this case.
     45 
     46 .. image:: lightmode.png
     47 
     48 In the second mode, Firefox identifies processes hosting each tab and shows
     49 their process IDs in the **Process IDs** column.  Process IDs are displayed in
     50 **bold** when they are hosting the tab’s top frame, and in *italic* when the
     51 process is shared between different tabs.
     52 
     53 After identifying the processes of all tabs, Firefox estimates memory usage of
     54 tabs and calculates the secondary weight for tabs that are not recently accessed.
     55 For recently accessed tabs, Firefox does not calculate the **Secondary Weight**
     56 and **Memory**, leaving those columns empty.
     57 
     58 .. image:: fullmode.png