MozillaZine

Performance Comparison of Mozilla 1.3 Beta and Safari v60

Friday February 14th, 2003

Mac bystander writes: "Interesting article comparing Mach-O Mozilla 1.3b on OS X to the new Safari beta. Sounds like the whole perf thing is not as clear-cut in that comparison as it is when comparing Safari to Chimera (off the 1.0 branch) or Netscape 7 (1.0 branch) on a broadband in-lab connection... ;)"


#1 Just wait...

by Kovu <Kovu401@netscape.net>

Friday February 14th, 2003 8:13 AM

Reply to this message

My hope is that in time Mozilla's greater developer base will result in Mozilla leaving Safari in the dust. I think once we get the GRE in place that we will eventually show Apple what a waste of time it was to put developers on a Web browser.

#2 Re: Just wait...

by bzbarsky

Friday February 14th, 2003 8:47 AM

Reply to this message

I don't think Mozilla has a greater developer base.... how many people are working on the core KHTML renderer? How many are working on the core Gecko renderer?

Additionally, diving into KHTML development is somewhat easier (the code is simpler). Which is unfortunate.

#3 Re: Just wait...

by i5mast

Friday February 14th, 2003 9:05 AM

Reply to this message

tt's the quality that matters not quantity. i think people like u make this browser shine

#5 Re: Re: Just wait...

by bzbarsky

Friday February 14th, 2003 9:54 AM

Reply to this message

Yeah, that too. And I can't say that we have higher quality developers than KHTML does.

There's also the minor caveat that KHTML can use any Mozilla code it wants whereas the reverse is not true..... Safari includes a couple of chunks of code that were very heavily based on the corresponding Mozilla code, for example.

#6 Re: Re: Re: Just wait...

by mozineAdmin

Friday February 14th, 2003 10:11 AM

Reply to this message

Yeah - I find that interesting, in that they didn't make mention of that in any press release when talking about Safari's power. At least give credit where credit is due.

#8 What KHTML-code is from Mozilla ?

by gadeiros <Harald@Henkel.DAH.UUnet.DE>

Friday February 14th, 2003 10:51 AM

Reply to this message

Could you please be specific, which parts of the code in KHTML come from Mozilla project and why Mozilla couldn't use KHTML code ? Both are Open Source, not ?

#10 Re: What KHTML-code is from Mozilla ?

by jgraham

Friday February 14th, 2003 11:38 AM

Reply to this message

I'm not entirley qualified to answer this but I guess KHTML is GPL'd and so any future release of the code must be under GPL. Mozilla on the other hand has the NPL/GPL and MPL/LGPL/GPL multi-licenses so code from KHTML would have to be relicensed to go into Mozilla.

#18 Re: What KHTML-code is from Mozilla ?

by bzbarsky

Friday February 14th, 2003 3:12 PM

Reply to this message

Well, lessee.... The view system (handling of z-index, opacity, etc) was entirely copied from Mozilla (such that hyatt felt he had to put every single Mozilla developer who has ever touched the relevant code in the Safari acknowledgements). The doctype-switching that apple implemented is entirely copied from the Mozilla code in nsParser.cpp (or so hyatt says). Those are two concreted code examples I know about.

Further, there is the benefit of implementation experience that hyatt brings to the table (eg he's planning on revamping the style system to be more along the line's of Gecko's; this is the _second_ style system Gecko has had; the first one proved to be too inefficient).

Mozilla cannot use KHTML code because it is all GPL and only GPL; Mozilla must be able to ship under other licenses as well. Mozilla's dual GPL/MPL license, on the other hand, is a lot less restrictive. So Safari can use any Mozilla code it wants, but not vice versa.

#35 Re: What KHTML-code is from Mozilla ?

by gadeiros <Harald@Henkel.DAH.UUnet.DE>

Sunday February 16th, 2003 4:00 AM

Reply to this message

"Well, lessee.... The view system (handling of z-index, opacity, etc) was entirely copied from Mozilla (such that hyatt felt he had to put every single Mozilla developer who has ever touched the relevant code in the Safari acknowledgements). The doctype-switching that apple implemented is entirely copied from the Mozilla code in nsParser.cpp (or so hyatt says). Those are two concreted code examples I know about."

I searchhed all the sources of KHTML of KDE 3.0.5 and didn't find any reference to code copied entirely from Mozilla, beside one function, which might belong to the doctype-switching.

Are you saying, KDE developpers copied code from Mozilla without giving any credit for this ?

" Further, there is the benefit of implementation experience that hyatt brings to the table (eg he's planning on revamping the style system to be more along the line's of Gecko's; this is the _second_ style system Gecko has had; the first one proved to be too inefficient)."

Well, sure Mozilla developpers have more experience with browsers, HTML, CSS, etc. After all Mozilla is "only" a browser suit, while KDE is a complete GUI system, including lots of applications.

I thought, OpenSource is also about code reuse...

" Mozilla cannot use KHTML code because it is all GPL and only GPL; Mozilla must be able to ship under other licenses as well. Mozilla's dual GPL/MPL license, on the other hand, is a lot less restrictive. So Safari can use any Mozilla code it wants, but not vice versa."

OK. But maybe, redistributing parts of that code under another license might be just a matter of asking the corresponding developpers for permission...

BTW, I don't really believe, that anybody took complete functions from one system to the other, because the class structure is propbably quite different and "incompatible". And copying ideas of how things should get done, cannot be prevented by licenses. It's a different matter, if I give "others" credit for the ideas, though...

#36 Re: What KHTML-code is from Mozilla ?

by gadeiros <Harald@Henkel.DAH.UUnet.DE>

Sunday February 16th, 2003 4:03 AM

Reply to this message

" I searchhed all the sources of KHTML of KDE 3.0.5 and didn't find any reference to code copied entirely from Mozilla, beside one function, which might belong to the doctype-switching. "

I forgot: ... and this was not copied but havily inspired by Mozilla code.

#37 Re: Re: What KHTML-code is from Mozilla ?

by bzbarsky

Sunday February 16th, 2003 10:44 AM

Reply to this message

> I searchhed all the sources of KHTML of KDE 3.0.5

Apple's changes have not been merged into the main tree yet. Wait till they have been.

> I thought, OpenSource is also about code reuse...

Open Source is about many things. Code reuse is certainly one of them.

> might be just a matter of asking the corresponding developpers for permission

Indeed. Would they give permission to relicense their code? I'm pretty sure that any changes Apple makes they won't relicense to be usable in Mozilla. Why would they?

> I don't really believe, that anybody took complete functions from one system to the other

Well.... if you're rewriting an entire subsystem, that's actually very doable. But yes, I'm sure some changes were made to the code to make it work in KHTML.

> And copying ideas of how things should get done, cannot be prevented by licenses.

As I said, the Apple engineer in question (hyatt) felt that he left the code intact enough that its use constituted a licensing of the original Mozilla code, not creation of original code.

I'm not saying that KHTML _has_ benefited from mozilla code much up to now. I'm saying they _will_ benefit significantly if they accept the changes Apple makes.

They could always reject those changes, of course (though I fail to see why they would, and if I were them I'd take the changes).

#4 Friendly Fire

by googolplex

Friday February 14th, 2003 9:17 AM

Reply to this message

Why do you want to leave Safari in the dust so much? Why don't we focus on beating IE and Microsoft instead of the niche browser Safari? Not to mention the fact that kHTML is open source as well, which is a good thing.

You're just bitter.

#11 Darn right

by Kovu <Kovu401@netscape.net>

Friday February 14th, 2003 11:59 AM

Reply to this message

Yeah I'm bitter; The last thing Mozilla needed is to have to compete against Apple, for crying out loud.

#15 because

by pbreit

Friday February 14th, 2003 12:40 PM

Reply to this message

Beating someone implies that you're actually serving some set of users. If you don't measure yourself against anything, you're liable to end up with a piece of bloat and a smallish user base.

#16 Appeal Not Destroy

by Tarraccas

Friday February 14th, 2003 1:18 PM

Reply to this message

If people want to use a different web browser, great! Better to have variety than none. Mozilla appeals to me and to a lot of others but not everyone nor should it ever be expected to. Forcing a "choice" on people serves only to create resentment. That said, I've never used Konqueror or Safari as I currently run neither Linux or Mac (which tend to make up approx. 3% of my web stats combined). However, I have had sites that Konqueror users complained that they couldn't use (probably due to DHTML). I, myself, still have to pull up IE to use some sites but that's becoming less and less as Mozilla gets better and better. The bottom line for me is that Mozilla gets the job done well even if it takes a little extra time to do so. If an iota of speed in someone's browser is more important than it's support then they have nothing to complain about if a page looks like crap or doesn't function at all. Use what is necessary to meet your needs.

#17 Re: Darn right

by schapel

Friday February 14th, 2003 2:39 PM

Reply to this message

You sound like you're against competition, and therefore against capitalism. What would you prefer to competition? IE as the only browser? A government mandated browser as the only browser?

Personally, I think Mozilla and other browsers need all the competition the market will bear. It will mean better browsers for consumers to use and for web developers to design for!

#26 Re: Re: Darn right

by bandido

Saturday February 15th, 2003 2:18 PM

Reply to this message

Just a clarification. Capitalism is not about competition but about who owns the ways and means of production. You can have competition in a communist /socialist system.

#21 I can hear you crying outloud.

by googolplex

Friday February 14th, 2003 6:05 PM

Reply to this message

For crying outloud? Thats exactly what you're doing. Whats wrong with another browser? Should other people not be allowed to do that? Its a good thing, "for crying out loud"! It makes Mozilla better. Don't you see that?

I love your ever so mature attitude to things things....

In your life when someone competes againts you in something do you get all angry and bitter and go pout in the corner? You probably take the competition and strive to do better and you appreciate it. Say you're playing a sport. When you play a hard team do you say: "For crying out loud, the last thing I need is somebody to play against! I hate the other team! Why are they trying hard!"

#12 Re: Friendly Fire

by macpeep

Friday February 14th, 2003 12:25 PM

Reply to this message

Why focus on beating anyone? Why not just focus on making great software? Sure, check the other browsers on the market to get ideas and to be able to compare to know where you are performance, usability, stability and feature wise, but why do you have to BEAT anyone?

#20 I agree

by googolplex

Friday February 14th, 2003 5:59 PM

Reply to this message

Because some people can't handle competition. I agree with you, if people focused on making things good instead of just beating something things would be better.

#28 Contradiction?

by bandido

Saturday February 15th, 2003 2:28 PM

Reply to this message

Don't you think thatn beating some product also means manking the product better. Car manufacturers use other manufcaturers cars as benchmarks in trying to make their lines better. What's wrong with that? If you want to make a car who excels in cornering abilities, you look ar cars in the similar categories and make sure you beat the best of the crop. Nothing wrong with Mozilla examining the competition and using benchmarks as ways of improving their product (tab browsing was not invented by Mozilla, but the success and popularity of Opera's tabs made it worthwhile copying that functionality).

I have to add that Mozilla as it is, is a very fine product that is getting better and better over time.

#30 Don't worry, it's coming ...

by DeepFreeze3

Saturday February 15th, 2003 7:04 PM

Reply to this message

I sense the people that head the Mozilla project will begin the process of kicking Safari's ass. Especially after all the lies they've been telling about how much "better" Safari is comapred to Gekco-based browsers. It's only a matter of time.

#7 Silly

by pbreit

Friday February 14th, 2003 10:38 AM

Reply to this message

Comparing performance over dial-up is somewhat dumb. Most of the time is taken up by data transmission and relatively little by rendering. And Safari is currently hobbled by a brand new port of QT and loads of debug code. And most of us have faster connections. Yawn.

#13 Re: Silly

by minh

Friday February 14th, 2003 12:27 PM

Reply to this message

Most of us? Where did you get that figure?

I have a dial-up connection and speed has always been an important issue with me. You are closed off in your own world. Many rural areas have limited broadband coverage. Other options beside cable and dsl are nonexistent or too expensive. Also, I can't justify the cost buying broadband yet. I pay only $5.95 per month for unlimited internet and email. I would have to pay $400 dollars more to get broadband.

#14 Re: Re: Silly

by jstrickland

Friday February 14th, 2003 12:38 PM

Reply to this message

I completely agree with you. Many people on broadband forget that still over 50% of internet users are on dial-up connections. That may change soon, but until it does, browser speed over a dial-up connection is important.

#23 Re: Re: Silly

by coch

Friday February 14th, 2003 11:01 PM

Reply to this message

Are thes eprices correct, seems like a big difference between dial-up and broadband prices to me. Where I live broadband is like 40$ and dial up 20-25$. I'd like to have dial-up for 5.95$ though.

#24 Re: Re: Re: Silly

by minh

Saturday February 15th, 2003 12:10 AM

Reply to this message

I didn't post my isp because I did want to look like a spammer. But since you asked, this is my isp:

<http://access4less.net/> $5.95 a month + $8 one time set up fee

*Information on how to get the $8 fee waiver: <http://www.freedomlist.co…php3?id=865&state=127>

This is the best deal I could find anywhere. They have a reliable connection. However, they are medium size national isp, therefore, they don't have nearly the same quantity of numbers as the major isp's. Included is unlimited internet, usenet and pop email. There is no idle disconnect except that you can only stay online for five hours max. Futhermore, customer service is done entirely by email unless you want to talk to a real person for a fee.

Finally, you are billed monthly, so if they go under, you lose very little. In the past I signed up for an isp (accesscheap) that gave me a year of internet for $60 dollars (total amount paid up front). Only after 3 months, the scammers ran away with the money. Therefor, I feel that this isp is a safe investment. I have used this isp for more than a year.

For more cheap isp's: <http://www.freedomlist.com/>

#25 Re: Re: Re: Silly

by Hendikins

Saturday February 15th, 2003 6:04 AM

Reply to this message

For me, here in Australia, I have the following options available. Note that I am not in a capital city charging area, so most ISPs are not available to me.

$38AUD/month for dialup @ 28.8k. unlimited hours/700MB data transfer. Local call costs apply. $80AUD/month for ISDN @ 64k. 700MB data transfer. $190AUD Installation. 30c/hour data call costs. $93AUD/month for 1way Satellite @ 400k downstream with 3GB data transfer. $325AUD Installation. Local call costs apply. $450AUD/month for 2way Satellite @ 512k with 3GB data transfer. $499AUD Installation.

Guess which of the above I have...

#27 Re: Re: Re: Re: Silly :)

by minh

Saturday February 15th, 2003 2:21 PM

Reply to this message

I don't have to guess, you told me *wink*. Although, how much USD equals AUD?

#19 Re: Silly

by bzbarsky

Friday February 14th, 2003 3:21 PM

Reply to this message

> Most of the time is taken up by data transmission

So the fact that Safari's HTTP networking subsystem does not reuse connections shouldn't be taken into account? Even broadband is nothing like the 100baseT network with 0 latency that perf "tests" are usually done over. On broadband, you still have somewhat limited bandwidth and more importantly connection setup starts to tell once you have latency.

Further, most home users _do_ still have dialup, you know. So this is a much more useful perf comparison for them.

I would love to see someone do a comparison over a broadband connection in a real-world browsing situation. I'd do it myself, if I had a Mac.....

> loads of debug code

It is? You sure? (People say and used to say that about Mozilla a lot, and it's definitely false and has been false for a _long_ time about Mozilla).

#9 performance

by CaptnMArk

Friday February 14th, 2003 11:03 AM

Reply to this message

I'd instantly give up a factor of 4 in pageload times to have 1/2 the memory footprint and 2x faster UI responsiveness.

I guess this means that the "necko" (?) people did their jobs well.

#22 Re: performance

by bzbarsky

Friday February 14th, 2003 6:06 PM

Reply to this message

Out of curiousity, what _is_ the memory footprint of Safari on statup? I'd expect it to be around 7-8MB....

#29 footprint

by marmoset

Saturday February 15th, 2003 5:40 PM

Reply to this message

BZBarsky:

Both launched on a machine w/ 512MB physical RAM, running OS X client 10.2.4.

Safari build 60, immediately after launch, set to open a blank window on startup:

RPRVT RSHRD RSIZE VSIZE 5.87M 13.6M 13.9M 58.3M

Mozilla 1.3b, immediately after launch, set to open a blank window on startup:

RPRVT RSHRD RSIZE VSIZE 12.5M 20.8M 27.8M 245M

#31 Re: footprint

by bzbarsky

Saturday February 15th, 2003 8:23 PM

Reply to this message

What do the two compare like after loading <http://lxr.mozilla.org/se…nsCSSFrameConstructor.cpp> (give it some time to load; it's big ;) )?

#34 Re: footprint

by antony <antonym@optushome.com.au>

Sunday February 16th, 2003 12:21 AM

Reply to this message

That page is actually scary (watching it render on a 20030130 build) - if I scroll to the bottom as the page renders, I can see it rendering almost a word at a time... a word appears, then a few more, then a burst of them, then I have to scroll down.... rinse, repeat. In the meantime the throbber isn't animating (does this mean it's received from the network but is still just rendering...?)

#38 What is your point?

by PaulB <pbergsag@home.com>

Sunday February 16th, 2003 4:02 PM

Reply to this message

Bzbarsky,

This page doesn't appear that unusual. It loads quickly, scrolls as I expect it to. What is your point here? BTW I am on a high speed connection, maybe your point can only be experienced on a slow dialup connection---or are you being a troll? ;)

#39 Re: What is your point?

by bzbarsky

Sunday February 16th, 2003 4:58 PM

Reply to this message

It's not unusual except for being somewhat large. Not even that large, though.

My point was that I wanted to see how much of the difference in size between Mozilla and Safari is static and how much is dynamic. If you read the next comment below this set (not sure why it was not a reply under here) you will have seen the answer. The idea of that exercise is that it gives me and other Mozilla developers a better idea of what causes the memory footprint we would like to reduce.

I have to admit this is the first time I've been accused of trolling in a Mozilla-related conversation, though. It's a nice refreshing change from the usual friendly and reasonable discourse I encounter.

#40 Not an accusation just questioning re: troll. eom

by PaulB <pbergsag@home.com>

Monday February 17th, 2003 12:02 PM

Reply to this message

Yes the footprint does increase, but with modern OS's modern memory management and memory chips being cheap, is this such an issue? It would be nice to get the size of the footprint down, but in the long run will the benifit be worth the effort? I have 256MB of memory on OS X 10.1.5 and rarely have a performance issue with Mozilla's footprint size.

#41 Re: Not an accusation just questioning re: troll. eom

by marmoset

Monday February 17th, 2003 12:54 PM

Reply to this message

Code footprint directly influences things that end-users do care about: launch time, swap usage (which impacts the performance of the entire machine), etc. Personally, it makes me feel good to see developers like BZBarsky taking time to care about optimization. Developers on other projects I've dealt with in the path are often quite appreciative when you can help them isolate memory leaks and increase efficiency. The application heap of product I was beta testing would balloon to several hundred megabytes in size when a particular combination of launch conditions were met, and the developer was able to dramatically improve the memory handling of his application in just a few hours because users cared enough to send him test cases and sample data. He was quite happy about it.

#42 Re: Not an accusation just questioning re: troll.

by bzbarsky

Monday February 17th, 2003 2:27 PM

Reply to this message

> is this such an issue?

Yes, when you consider that Gecko is targeting markets other than the desktop market as well...

Note that decreasing static footprint involves decreasing the amount of code. Which means the code gets simpler, typically. And making the code simpler should, imo, be the #1 priority for people working on this project.

One other thing. Dynamic footprint is all fine, but _static_ footprint affects startup time very directly. If the Mozilla object files are 20MB, it can't start faster than you can read 20MB of data off your disk (modulo memory caching of disk, of course, but some OSes (Windows) don't do very much of this).

#32 further adventures in footprint

by marmoset

Saturday February 15th, 2003 9:14 PM

Reply to this message

Safari: 45.2M 15.0M 52.5M 106M

Mozilla: 36.9M 20.9M 53.1M 270M

Looks like Mozilla renders it using considerably less RAM (Safari rendered it faster, though.) How is that page laid out (I'm literally afraid to view-source on it) is it a big table, or something else entirely?

#33 Re: further adventures in footprint

by bzbarsky

Saturday February 15th, 2003 9:23 PM

Reply to this message

It's a big <pre>. Each line of code has an <a name="900" href="/seamonkey/source/layout/html/style/src/nsCSSFrameConstructor.cpp#900"> (or whatever the line number is) on the number. Then it's just text. The links are done in the obvious way; the italics are <i>

I think this example reinforces something some people have been saying for a while now about Mozilla -- that a large chunk of the footprint is actually static code footprint -- just the size of the CODE segment of the libraries.

There's a good deal of ongoing work to reduce this (though the efforts are having mixed success at best, as you can see if you look at the corresponding graph on Tinderbox....)