Problem. You are wondering about the memory usage of web browsers. Many people load hundreds of web pages, often over periods of 3+ hours, and complain about the memory usage of Firefox, Safari, or Internet Explorer. Traditional benchmarks do not look at all the things you might do with a program, and we need real-world numbers over a period of hours.
Solution. I developed a Windows Forms application in .NET called Memory Watcher that "watches" the system memory numbers. It uses a timer to poll the processes every 3 seconds. It then records every number, which allows us to keep track of each program's memory usage over time and with real-world usage. I collected over 1 million data points over 14+ hours.
These results are from opening Memory Watcher and then using the browser between 9,000 and 11,000 seconds—close to 3 hours. Each browser is tested in a separate session, and there are brief periods of inactivity throughout the time period. The vertical axis is the memory used in MB, and the horizontal axis contains the memory "checkpoints" my program took (one every 3 seconds).
The above profiles are not a direct comparison in any way, but they offer a visualization of trending in the memory behavior of the layout engines and interfaces. This is not a diagnosis or bug report. Let me show some important metrics of the above results.
| Browser name | Exact version | Time active (s) Hours | Comments |
| Safari | 3.1.2 | 10,470 s 2.91 hours | Normal browsing |
| Firefox | 3.0 | 9,681 s 2.69 hours | Normal browsing No extensions |
| Flock | 1.2.2 | 10,146 s 2.82 hours | Flock is based on Firefox 2.0 No extensions other than the default |
| Opera | 9.5 | 9,855 s 2.74 hours | No extensions Only browser was used |
| IE | 8.0 | 10,236 s 2.84 hours | Used 7.0 rendering mode No extensions |
The system is Windows Vista SP1, and the computer has 3.0+ GB of RAM. No plugins are disabled, but the Acrobat Reader and Java plugins were (presumably) not used. Flock is based on Firefox 2.0 but its memory usage is probably worse because it uses built-in extensions.
The data in this article are those reported by Windows Vista, but the exact individual numbers should not be compared to each other. Some browsers were tested slightly longer than others, and some different pages were loaded. That said, here are the final performance metrics.
| Browser name | Ending private set in MB |
| Safari | 636.9 |
| Firefox 3 | 111.8 |
| Flock (Firefox 2) | 191.9 |
| Opera 9.5 | 190.6 |
| Internet Explorer | 194.4 |
Memory Watcher is a small program I wrote that records the memory usage of each process on the system every three seconds. It uses the PrivateMemorySize64 long value from the Process collection in .NET.
Here we note that a second iteration of this article was published on June 20, 2009, featuring Google Chrome 3.0 developer channel release, Firefox 3.5 RC, Opera 10b, and Safari 4.0 final. The results in this new benchmark have similar results to this study, with Firefox's new version maintaining excellent memory efficiency. [Chrome and Firefox 3.5 Memory Usage - dotnetperls.com]
These profiles are meant to provide a picture of what the memory behavior of popular browsers is over a period of time, not to provide absolute benchmark times. Firefox 3.0 shows memory usage that is significantly lower than Firefox 2, which also does very well. Here is a summary of my results.
Final thoughts. After browsing for 14 hours with these programs, and recording all the results into spreadsheets, the most memory efficient browser in my usage is very clear—Firefox 3.0 not only trumps its older version, but every other popular offering on Windows. This article may help other vendors rethink their marketing campaigns, and may prompt further improvements.