You are interested in how the Google Chrome 3.0 Dev, Firefox 3.5 RC, Safari 4.0 for Windows, and Opera 10bweb browsers manage memory on the Windows Vista operating system over moderate usage, such as with 150 top web sites. These numbers can be measured but there are complexities involved in measuring memory. Here we look at a program that simulates a user visiting the top 150 web sites from Alexa from the command line, with visits occurring at short but varying intervals in many tabs.
Benchmark description
Here we mention the general overview of the benchmark used in this article. Each browser was configured to open new URLs from the command line into new tabs, with each previous page being kept accessible from the tabbed interface. After 30 URLs were tested in all four browsers, the software prompted me to close all tabs in the browsers except one tab. This simulates a user opening many sites in one sitting and then taking a short break and closing pages; it neglects the back/forward mechanism.
Memory checkpoints. The memory watcher utility used in the benchmarks is configured to obtain an array of all processes running on the Windows system every 3 seconds. It then stores all those figures in megabytes in internal data structures. When a process with the same name such as "chrome.exe" is encountered more than once, its total size is accumulated, yielding a total of all the "chrome.exe" figures together. The X axis indicates the time checkpoints and 1 checkpoint is equal to 3 seconds.
System configuration
This exploration of browser memory usage was undertaken on a Windows Vista Home Premium system with 4.00 GB of memory installed and the 32-bit version of Windows. Visual Studio and the .NET Framework 3.5 SP1, my memory watching utility, and the command-line driver for the browser were used.
Alexa sites
Because every user has a different selection of sites he uses, the sites tested programmatically in this examination were taken directly from the Alexa top sites CSV file at http://s3.amazonaws.com/alexa-static/top-1m.csv.zip. This list is the property of the Alexa service and will not be made available on dotnetperls.com. The CSV used was downloaded on June 19, 2009.
Results
Here we see the results of the experiment when performed as described above. During the experiment, 384 memory checkpoints were taken, which amounts to 1152 seconds or 19.2 minutes. Google Chrome posted the highest maximum memory usage when all chrome.exe processes were summed, reaching 1.18 gigabytes, while Firefox posted the lowest maximum memory levels of 327.65 megabytes. This means Firefox used 73% less memory during peak periods.Maximum memory used Peak memory usage measured during experiment. Chrome: 1216.16 MB [Largest] Firefox: 327.65 MB [Smallest] Opera: 554.11 MB Safari: 517.00 MB Average memory used Average of all memory checkpoints throughout experiment. Chrome: 543.83 MB [Largest] Firefox: 166.82 MB [Smallest] Opera: 347.45 MB Safari: 319.44 MB Final memory used Figures taken after all tabs were closed at end. Chrome: 109.49 MB Firefox: 106.66 MB [Smallest] Opera: 441.49 MB [Largest] Safari: 349.62 MB
More results. Firefox 3.5 also had the best average memory usage figures, meaning that it may consume the least memory of these browsers when used for the Alexa sites as tested in the benchmark. Finally, Chrome and Firefox posted the best memory figures at the end of the browsing session, with Opera consuming 4.1 times more memory than Firefox at the end of the test.
Memory champion
Here we note the browser that has the best results in the experiment at every level. Firefox 3.5 used the smallest amount of memory during its peak, it used the smallest amount of memory when all points were averaged, and it used the smallest amount of memory at the end of the experiment after all tabs were closed. Firefox 3.5 continues Firefox 3.0's legacy of being the most memory efficient browser in this style of experiment.
Source code
Here we see the source code written in the C# programming language targeting the .NET Framework that issues commands to the browsers specified in the static string array. All the five browsers support command-line arguments of the form of a URL with no prefix. The program uses pauses with the Thread.Sleep method to try to introduce more unpredictability into the benchmark. This could avoid edge cases where the a certain timing could interact with a browser's cache algorithms in a less representative way.
-- Source: http://www.dotnetperls.com/chrome-memory