Toshiba Help Center

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 25 June 2007

Hacking Firefox: The secrets of about:config Stop memory hogging

Posted on 20:48 by Unknown
Stop memory hogging
The default way the Windows version of Firefox consumes memory can be alarming if you don't know what's really going on. People routinely report a memory "footprint" of 75MB to 100MB or more with only a few windows or tabs open, and they assume a memory leak is to blame. While earlier versions of Firefox did have memory leak bugs, they're not the reason for this kind of memory consumption in Firefox 2.x.

Here's what's happening: Firefox caches recently used objects -- Web pages, images -- in memory so that they can be re-rendered on-screen quickly, which drives up memory usage. The following tweaks can make Firefox stake out memory less aggressively. (Note, however, that lightening the memory load might make your pages load a bit more slowly than you're used to.)

Reduce graphics caching
When the Boolean preference browser.cache.memory.enable is enabled (the default), Firefox keeps copies of all graphical elements from the current browsing session in memory for faster rendering. You can set this to false to free up more memory, but pages in your history will reload less quickly when you revisit them.

Another option: Set the value to true and create a new integer preference called browser.cache.memory.capacity. Then specify, in kilobytes, how much memory to set aside for graphics caching. That way you get some of the speed benefits that graphics caching provides without taking a huge memory hit. If you use -1 as the memory value, Firefox will size the memory cache based on how much physical RAM is present.

Reduce Web page caching
Firefox caches several recently visited Web pages in memory so they don't have to be regenerated when you press Back or Forward. The integer setting browser.sessionhistory.max_total_viewers determines how many individual Web pages to store in the back/forward cache; each page takes about 4MB (or 4,000KB) of RAM.

By default, however, this value is set to -1, which determines how many pages to cache from the amount of available physical memory; the maximum number of pages stored when you use -1 is 8. Set this value to 0 to disable page caching entirely. That will save some memory, but will also cause Back and Forward navigation to slow down a bit.

Note that this caching is not the same as browser.cache.memory.enable: That setting is for rendering elements on pages like graphics and buttons, and the contents of https-encoded pages, while this setting is for caching the text content of Web pages that have already been rendered or "tokenized."

Swap out to disk memory when minimized (Windows only)
A little-known feature in Firefox allows the Windows memory manager to swap out some of Firefox's physical memory space to disk when Firefox is minimized but not closed. This allows other programs to use the physical memory that Firefox was previously monopolizing.

With config.trim_on_minimize.

Without config.trim_on_minimize.

Firefox's minimized memory usage with (top) and without (bottom) config.trim_on_minimize. (Click for larger view.)
By default, this feature is turned off, for two reasons: 1) PC memory is generally more plentiful than it used to be, so it makes sense to use it if it's available, and 2) swapping Firefox's memory out to disk will slow the program down when it's restored.

That said, if you run Firefox side by side with other memory-hungry applications, it might help keep them from competing with each other. To enable this feature, create a new Boolean preference called config.trim_on_minimize and set its value to true.

Got your own about:config tweaks to share? Add them to the Comments area at the bottom of the page. If you've got the itch to learn more about about:config settings, MozillaZine's about:config entries wiki is a great source of information.


Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Toshiba's stylish Tekbright 7 digital photo frame
    As the barrage of new Toshiba gear continues to flow from Paris, along comes a device that we ...
  • 20 Open Source Windows Apps For You
    Some of the commercial software like Photoshop are so expensive that an average user can not afford to buy it. Lately I am looking for some ...
  • Mortgage insurance
    Mortgage Life Insurance refers to an insurance policy that guarantees repayment of a mortgage loan in the event of death or, possibly, di...
  • So You Want To Be An Affiliate Marketer
    If you're like 99% of the population, you have some interest that you are passionate about. Maybe it's travel, or sports or animals....
  • Windows XP Home and Professional Command Line Commands | Run Line Commands
    One big negative of being a desktop specialist can be the daunting task for browsing through multiple directorys and/or shortcuts to find ma...
  • Money
    Economics offers various definitions for money, though it is now commonly defined as any good or token that functions as a medium of exchang...
  • Performance bond
    A performance bond is a surety bond issued by an insurance company to guarantee satisfactory completion of a project by a contractor. For ex...
  • MBA
    Master of Business Administration (MBA) is a master’s degree in business administration, which attracts people from a wide range of academic...
  • Steam Powered Car to Hit 200MPH
    This is the Inspiration, the British steam powered car that is attempting to take the British and World land speed records (for steam vehicl...
  • Asian currencies get lift from rising shares
    BEIJING: Rising Asian shares buoyed most regional currencies on Friday, with the Philippine peso leading the pack after the central bank in...

Categories

  • accessories
  • aid
  • application
  • banks
  • broker
  • business
  • business.news
  • casual
  • credit
  • education
  • firefox
  • forex
  • gadgets
  • games
  • help
  • internet
  • laws
  • linux
  • mechanical
  • media
  • microsoft
  • mobile
  • newa
  • news
  • online
  • scripts
  • technology
  • tems
  • terms
  • training
  • windows application
  • windows tweaks

Blog Archive

  • ▼  2007 (149)
    • ►  August (14)
    • ►  July (120)
    • ▼  June (15)
      • How do you burn a 760mb iso file into a 700mb cd-r...
      • How to copy a DVD
      • The folder option in my control panel has been dis...
      • How to Install Windows Vista-illustrated
      • How Do I Add A Logo And Support Information To My ...
      • How Do I Install Windows XP-illustrated For Beginner
      • High Yield Investment Program
      • Hacking Firefox: The secrets of about:config Stop ...
      • Hacking Firefox: The secrets of about:config Hack ...
      • Hacking Firefox: The secrets of about:config User ...
      • Hacking Firefox: The secrets of about:config Tabbe...
      • Hacking Firefox: The secrets of about:config Speed up
      • Hacking Firefox: The secrets of about:config
      • Investment
      • MBA
Powered by Blogger.

About Me

Unknown
View my complete profile