Results 1 to 2 of 2

Thread: Decrease memory usage of Chrome and Firefox

  1. #1
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    37,344
    Activity Longevity
    5/20 19/20
    Today Posts
    0/5 ssss37344

    Decrease memory usage of Chrome and Firefox

    If you like these browsers but are not able to download more RAM due to the coronavirus pandemic and global financial crisis, here's what you can do.

    Chrome
    • Use the following command-line parameters.
      Code:
      --process-per-site --in-process-gpu --disable-breakpad --disable-crashpad --load-media-router-component-extension=0
      Note that they must be added to all shortcuts, as well as the association for HTML files and the HTTP and HTTPS protocols in the registry. None of these can be applied via group policy, so this is the only way. (If Chrome doesn't start after this, remove --in-process-gpu. If you really need Chromecast, remove the last one.)
    • Go to chrome://flags/#network-service-in-process, locate "Runs network-service in-process", set to enabled and restart.
    • Most extensions start an additional process and/or increase memory usage. Lose the ones you don't really need - I don't use any! As a prominent member here once said, "by eliminating the irrelevant, only the relevant remains".

    Firefox
    • Options -> Preferences -> General -> Performance, untick "Use recommended performance settings", set "Content process limit" to 1 and restart.
    • Setting the environment variable MOZ_FORCE_DISABLE_E10S=1 will take that even farther by using just one process for everything, but is unsupported and may cause trouble.
    • Fewer addons = less memory usage.
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  2. Who Said Thanks:

    joe1982 (30.07.20) , lyric (05.07.20) , Instab (04.07.20) , cloud99 (04.07.20)

  3. #2
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    37,344
    Activity Longevity
    5/20 19/20
    Today Posts
    0/5 ssss37344
    I was going to wait until I could also post updated tips for Chrome, but it'll take me a while to revalidate previous advice and test new one, so let's push this for Firefox in the meantime. The Electrolysis multiprocess functionality can be finely tuned through many configuration parameters. Disabling additional processes potentially sacrifices stability and security at the cost of cutting down memory usage. Knowing this, read below and append the blocks you can live with to your user.js.

    Code:
    // Prevent accessibility services (and anything claiming to be such) from hooking into the browser
    user_pref("accessibility.force_disabled", 1);
    
    // Uncomment to disable the launcher process
    // Note: I actually don't recommend that, it has important functions and does not stay active after startup.
    //user_pref("browser.launcherProcess.enabled", false);
    
    // Apparently these are "gatekeeper" preferences that allow configuring the rest
    user_pref("browser.tabs.remote.autostart", false);
    user_pref("browser.tabs.remote.autostart.1", false);
    user_pref("browser.tabs.remote.autostart.2", false);
    user_pref("browser.tabs.remote.desktopbehavior", false);
    user_pref("browser.tabs.remote.force-enable", false);
    
    // Don't run a separate process for file:/// addresses
    // Side effect: access to most of them will be denied, even with administrator privileges.
    user_pref("browser.tabs.remote.separateFileUriProcess", false);
    
    // Don't run a separate process for privileged content (e.g. about:config)
    user_pref("browser.tabs.remote.separatePrivilegedContentProcess", false);
    user_pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
    
    // Only run a single process for Web content, and when necessary
    user_pref("browser.newtab.preload", false);
    user_pref("browser.preferences.defaultPerformanceSettings.enabled", false);
    user_pref("dom.ipc.processCount", 1);
    user_pref("dom.ipc.processCount.webLargeAllocation", 1);
    user_pref("dom.ipc.processPrelaunch.enabled", false);
    user_pref("dom.ipc.keepProcessesAlive.privilegedabout", 0);
    
    // Don't run a separate process for Flash crash reporting
    // Note: has little relevance, as you shouldn't use the Flash plugin to begin with.
    user_pref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", false);
    
    // Don't run a separate process for Virtual Reality components
    user_pref("dom.vr.process.enabled", false);
    
    // Don't run a separate process for addons
    user_pref("extensions.webextensions.remote", false);
    user_pref("extensions.webextensions.protocol.remote", false);
    
    // Don't run a separate process for GPU rendering
    user_pref("layers.gpu-process.enabled", false);
    user_pref("layers.gpu-process.force-enabled", false);
    
    // Don't run a separate process for video decoding
    user_pref("media.gpu-process-decoder", false);
    user_pref("media.rdd-process.enabled", false);
    
    // Don't run a separate process for the network service
    user_pref("network.process.enabled", false);
    
    // Don't run a separate process for WebGL
    user_pref("webgl.out-of-process", false);
    Also, MOZ_FORCE_DISABLE_E10S seems fully operational again. Some comments claim that browser.tabs.documentchannel.ppdc=false is required to work around buggy rendering, and sometimes setting the environment variable's value to the Firefox version number is necessary for it to be effective, but during my tests it worked fine without having to do either. Beware, however: this is basically hardcore mode and completely disables the multiprocess architecture. A single buggy page may crash the entire browser. In contrast, even applying every configuration parameter above will avoid that by still separating the main process from the renderer.
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  4. Who Said Thanks:

    JohnareyouOK (23.04.21) , Instab (21.04.21) , sigduwksnsksis9283 (21.04.21)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •