Blog

Firefox Cache

Today I found the confirmation for something I have been guessing for a long time. Firefox high memory usage is not only due to memory leaks, but I could only guess that when Firefox had been using 400-600MB of RAM it must have been caching all my browsing session in memory.

In this article, element14 (I guess its the nickname) states that Firefox has no “memory bug”. While this is not totaly true, it sure has some, the huge memory usage is in fact due to the fact that Firefox stores the last five browsed pages, for each tab. The article provides some configurations to improve this and some other things that can improve the overall performance. Nice reading to people not used to play with “about:config”.

Now, whats wrogn with this caching features? Should they exist?

I guess that they should exist but shouldn’t be on by default. This should either not default or should be smart enough to only cache something on RAM if, lets say, 20% is free. But the real improvement I would see here is to actully serializa the rendered pages (the same thing they are storing in RAM) to the hard drive. This would keep the RAM usage very low, and loading the page from hard-disk would be still much faster than downloading it all. In the end, its difficult to prove without testing, the performance would still match the current version from the user prespective.

I also realize two things:

  1. Firefox implemented this, maybe even rushed it, because its a nice “performance” improvement from the users usability point of view. Mainly because it was noteworthy for Firefox 1.5 Release Notes.  But even providing some extra nice features but the fast Back and Forward it lacks some common sense when this “performance” improvement easily hits more than 100MB of RAM usage. I realy tough Mozilla Foundation had higher standards.
  2. Implementing serialization of the cached data, the rendered pages, to the disk may not be easy and require a lot of changes, but its a real performance improvement over what I think was mistaque.

Lets hope someone reads me and that this idea has some usefull tips :)

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Leave a Reply

For spam filtering purposes, please copy the number 8829 to the field below: