Board logo

标题: Firefox 3真实的内存使用 [打印本页]

作者: Mallon    时间: 2008-6-25 17:58     标题: Firefox 3真实的内存使用

http://software.solidot.org/software/08/06/25/0548258.shtml

一位程序员为Windows操作系统开发了一款每3秒记录一次浏览器内存使用的程序,他记录了5种浏览器在3小时内的内存使用数据点:Safari3.1,Firefox 3,Flock 1.2(基于Firefox 2的浏览器), Opera 9.5,和Internet Explorer8,都没有使用扩展程序。约1百万的数据点显示Firefox 3在内存使用上确实比其它浏览器有不小的优势。作者认为:Safari 3.1(Windows)的内存管理很糟糕,Opera 9.5的新内核Kestrel并不能称得上是革命性的技术。
作者: Mallon    时间: 2008-6-25 17:59

Firefox 3 Memory Benchmarks and Comparison

by Sam Allen

Web browser performance is an often talked-about and flaunted thing, but many claimsare not really backed up by solid evidence. I wrote software that collected millionsof data points over 14 hours of actual browsing time, and this article revealsmy findings.

ProblemMany people load hundreds of web pages, sometimes at the same time, oftenover periods of 3+ hours. Users complain about the memory usage of Firefox, Safari,or Internet Explorer, and we need a way to identify which browsers are better atmanaging memory than others. Traditional benchmarks do not look at all the thingsyou might do with a program, and we need real-world numbers over a period of hours.

SolutionI 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 and also prints them out in a grid on the screen. Thisallows us to keep track of each program's memory usage over time and with real-worldusage.

Memory ProfilesThese results are from opening Memory Watcher and then using the browser between9,000 and 11,000 seconds (close to 3 hours). Each browser is tested in a separatesession, 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 thememory "checkpoints" my program took (one every 3 seconds).



Benchmark DetailsThe above profiles are not a direct comparison in any way, but they offer a visualizationof 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 theabove results.

Browser nameExact versionTime active (s)
Hours
Comments
Safari3.1.210,470 s
2.91 hours
Normal browsing
Firefox3.09,681 s
2.69 hours
Normal browsing
No extensions
Flock1.2.210,146 s
2.82 hours
Flock is based on Firefox 2.0
No extensions other than the default
Opera9.59,855 s
2.74 hours
No extensions
Only browser was used
IE8.010,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 pluginsare 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 ituses built-in extensions.


Final Memory MeasurementsThe data in this article are those reported by Windows Vista, but the individualnumbers should not be compared to each other. Some browsers were tested slightlylonger than others, and some different pages were loaded. That said, here are thefinal performance metrics.
Browser nameEnding private set in MB
Safari636.9
Firefox 3111.8
Flock (Firefox 2)191.9
Opera 9.5190.6
Internet Explorer194.4



About the "Memory Watcher"Memory Watcher is a small program I wrote that records the memory usage of eachprocess on the system every three seconds. It uses the PrivateMemorySize64long value from the Process collection in .NET.


ConclusionThese profiles are meant to provide a picture of what the memory behavior of popularbrowsers is over a period of time, not to provide absolute benchmark times. Firefox3.0 shows memory usage that is significantly lower than Firefox 2, which also doesvery well. Here is a summary of my results.


Final ThoughtsAfter browsing for 14 hours with these programs, and recording all the results intospreadsheets, the most memory efficient browser in my usage is very clear--Firefox3.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 promptfurther improvements.

[ 本帖最后由 Mallon 于 2008-6-25 18:01 编辑 ]
作者: Snowpine    时间: 2008-6-25 23:08

没有感觉特别省内存,但是感觉maxthon特别耗内存,还经常死掉!




欢迎光临 幽游生活 (http://www.yylive.net/) Powered by Discuz! 7.2