Sunday, November 14, 2010

Firefox: Moving Your Cache to RAM (Performance Tip)

For a long time browsers have kept local copies of web page objects (such as HTML files, graphics, flash, and other files) on the hard drive. This allows the browser to access these files much more quickly if they're needed again without having to download them from the Internet.

Firefox has a setting that allows the browser's cache to be moved to RAM instead of the hard drive. Since RAM can be access much faster then the hard drive, this means that you can see much faster returns on any cache hits from your browser.

Warnings: 
  • This tip may cause problems with browser plug-ins.
  • Follow the advice of this tip at you're own risk, if implemented incorrectly it could disable the browser until its reversed.
  • Luanch Firefox
  • In the address bar type: about:config
  • Type browser.cache into the filter bar at the top.
  • Search for: browser.cache.disk.enable and set it to false (double-click it).
  • Search for: browser.cache.memory.enable and set it to true (double-click it).
  • Right-click anywhere, in the menu select New > Integer.
  • For the preference name, type: browser.cache.memory.capacity and press OK button.
  • In the next window, enter the size you want the cache in kilobytes (for example, typing 200000 would create a cache of 200,000 kilobytes or about 200 megabytes). A value of -1 forces Firefox to dynamically determine the cache size depending on the available system RAM.

Note: Since files are no longer stored on the disk, Firefox start-up can take longer. Also fewer objects are generally cached in RAM because of limited available system resources.

No comments: