Live data from Hacker News

Engineering code quality in Firefox

hacks.mozilla.org

111–120 of 155 posts

Re: Engineering code quality in Firefox

#111
post #63

Earlier quoted context omitted.

> Care for the open web, fear ie6, and at the same time enjoy firefox! And remember: Chrome is the new IE. (Since a number of people have misunderstood this quote in the past I'll explain it up front: 1. IE was in some ways technically superior to competition until they became dominant. 2. At the same time devs stopped caring about other browsers, and then 3. Microsoft lost interest in it. We are repeating this it se…

For people who don't care about privacy, what would be the motivation for making the switch? Chrome is good enough. The interface is still streamlined. Microsoft didn't just lose interest in IE, but it became bloated with the toolbar. The UI wasn't well proportioned in general. Web development wise, it was a struggle to be compatible with IE. Chrome may be setting the web standard for better or worst, but atleast dev…

>The sentiment is that writing code to work I.E. would be exceptional, whereas now writing code for non-Chrome browsers would be the exceptional case. In fact, developers sometimes only test Chrome. Some popular E2E JavaScript testing frameworks only work with Chrome.

This was once the case with IE, as well. Testing code in non-IE browsers used to be the exceptional case, and a lot of developers only ever tested in IE. There are countless enterprise applications that only work in IE even now, which is most likely the main reason that Microsoft is still keeping IE alive.

Re: Engineering code quality in Firefox

#112

Earlier quoted context omitted.

About the NDA part: some community members have the possibility to sign an NDA and get access to some Mozilla Corp information before it is public. This is absolutely not required to contribute to the code base. About DRM: Mozilla fought against it, and caved when it became clear they could not win. But Firefox users still have to opt-in to install the binary blob (eg. Widewine), it's not bundled in the browser.

> About DRM: Mozilla fought against it, and caved when it became clear they could not win. While I do believe there was genuine opposition to this move within the community, I think the real decision makers had already made up their minds and just made a show of "discussing" it. I feel they did it under pressure, and perhaps were even induced with promises of more revenue, from Google. And where was the question of r…

> While I do believe there was genuine opposition to this move within the community, I think the real decision makers had already made up their minds and just made a show of "discussing" it. I feel they did it under pressure, and perhaps were even induced with promises of more revenue, from Google.

The problem with beliefs is that there is no option to disprove them. Mozilla said they fought against it, the people who were there say they did fight against it, you don't believe it and think it's some kind of "show" put up.

> All they had to do was ask Google (or any other company) to develop a browser plugin for Firefox and let the user decide if they wanted it (when a user encountered it on a site, produce a pop-up alerting the user to the plug-in required).

And what incentive would companies have had to do that? Firefox simply doesn't have the market share to force anyone to develop for them. Even worse, Google has every incentive to not do it and instead pop up a banner "hey, looks like your browser doesn't support YT, use Chrome". People who argue that Mozilla was wrong to accept the DRM blob never have a good answer for this and usually then end in "people would have seen that Mozilla is right and boycotted YT" or "who cares if Mozilla has only 1% market share, it's far more important to never make any compromise".

Re: Engineering code quality in Firefox

#113
post #20

Earlier quoted context omitted.

Chrome has the same issue. The thing is, Safari is deeply connected to OS X and its internals to save as much energy as possible. Apple can do this and tie the code to the specific hardware, kernel, and what else matters that Safari runs on as they control everything. Chrome and Firefox cannot. I would not be surprised if someone tells me that parts of Safari hook into private APIs in the kernel, the graphics driver…

You think Apple should be punished for creating a vertically integrated stack? Setting aside private APIs as I have no idea what Safari does or doesn't use (although vast portions of it are open source, enough that you can compile modern versions of WebKit and "upgrade" the ancient WebKit on PowerPC Macs), another browser could be just as closely integrated as Safari. Obviously, the cost/benefit ratio is awful for Mo…

> You think Apple should be punished for creating a vertically integrated stack?

No, only for not giving everyone a fair and equal level of access. I'm not against Apple deeply integrating Safari into the OS, but they should allow competition to enjoy the same level of performance that their own stuff does.

Re: Engineering code quality in Firefox

#114
post #109

Earlier quoted context omitted.

Talks about zero-sum. Uses things based on the results of said zero-sum system. Makes you laugh and cry at the same time.

Real life results of academia are largely propaganda (tuition billions well spent). They are not even good in figuring out why/how things work and replicating success (additionally proven by Soviets).

Your language of choice - Clojure according to your HN bio - works on a product where important parts (e.g. Generics and the Java collection framework) were done by academia. One of the most popular compilers (LLVM) was done in academia (and still is in parts!). Most of the optimizations compilers use were done by academia.

Your work stands on the work of countless academic researchers and you run around "What did academia EVER do for us?" - the Monty Python sketch about Romans comes to mind.

Re: Engineering code quality in Firefox

#115
post #114

Earlier quoted context omitted.

Real life results of academia are largely propaganda (tuition billions well spent). They are not even good in figuring out why/how things work and replicating success (additionally proven by Soviets).

Your language of choice - Clojure according to your HN bio - works on a product where important parts (e.g. Generics and the Java collection framework) were done by academia. One of the most popular compilers (LLVM) was done in academia (and still is in parts!). Most of the optimizations compilers use were done by academia. Your work stands on the work of countless academic researchers and you run around "What did ac…

This is especially laughable, since I have seen how that works on practice: take something everyone already does, write 1000 of PhDs on that, add to academic history book, now wikipedia and voila.

If any of IT projects came from academia to the market, it's only because certain people were picked up by businesses that were onto something already.

Re: Engineering code quality in Firefox

#116
post #44

Earlier quoted context omitted.

The WebKit team is smaller than the corresponding team at Mozilla, even if you look at the subset of of identical roles across both organizations (and e.g. ignore those working on the Firefox network stack). That said, it's worthwhile remembering that WebKit does very much maintain all the abstractions to be cross-platform (and Apple do still maintain a Windows port), even if it does try and leverage plenty of OS lib…

would there be a corresponding safari team separate from webkit? I wonder if webkit might have (and benefit from) multiple internal "customers".

It's organisationally under the Safari team, as far as I'm aware.

Re: Engineering code quality in Firefox

#117

Earlier quoted context omitted.

Presto wouldn't be so memory efficient on today's web; web applications typically ran into plenty of places where memory consumption was worse in Presto versus WebKit, for example. (A simple example here is that each DOM Node was larger in Presto than any other browser, if I'm not forgetting.) But ultimately a lot of this comes down to different considerations: when the majority of your revenue comes from companies w…

> Presto wouldn't be so memory efficient on today's web; I disagree. (I continued to use the last version of Opera Presto for a few year even after it was abandoned, and it continued to outperform other browsers on both platforms - Windows and macOS, though the macOS version was a bit more buggy). Let's not forget that Presto already supported a lot of HTML5 features(1) before it was abandoned. (Even today, it works…

> I disagree. (I continued to use the last version of Opera Presto for a few year even after it was abandoned, and it continued to outperform other browsers on both platforms - Windows and macOS, though the macOS version was a bit more buggy).

Loading my profile on Twitter leads Presto to use more memory than Firefox. (Though really that's a terrible benchmark, probably want to disable in-memory caching.)

> Let's not forget that Presto already supported a lot of HTML5 features(1) before it was abandoned. (Even today, it works surprisingly well on most websites, though it does show its age a bit). And while the last few versions did seem to be a bit more resource heavy, I attribute that to development suffering because of the upheaval in the company - morale was low as many developers were laid-off while the management was also negotiating a sell out with investors. This naturally stunted the development of the core browsers parts in the end.

In all due respect, you sound like you have no idea what you're talking about, neither with when there were lay-offs or with how morale was internally. Morale only really collapsed after the move to WebKit, nor had there been lay offs for several years prior.

The increases in memory consumption were primarily down to changing trade-offs with performance v. memory consumption, and certainly a fair number of these were configurable at compile-time (heck, Futhark stayed around for a while after Carakan was shipping on desktop precisely because it's memory consumption was lower).

> I can't comment much about this - The source code of Opera Presto is out there on the net, and it is definitely much easier to understand than the Firefox codebase. I also remember that the popular Macromedia (now Adobe) Dreamweaver used the presto engine at one point.

The graph of module dependencies was… quite something. There was a _lot_ of mutual dependencies between modules, so in many ways it really wasn't modular.

As for embeddability, I'll point out that typically there were multiple implementations of platform layer stuff across the company (heck, Core maintained an almost entirely separate implementation to Desktop for all the platform layer stuff, despite the test browser running _on the same platforms as Desktop_). You had to write a lot of code to get the browser running on a new platform.

As for all your comments about Gecko's embeddability, I'm not even going to give them a response; they've largely been covered already.

Re: Engineering code quality in Firefox

#118
post #66

We had an "open-ended" project in an undergraduate Computer Security course to discover a 0-day in Firefox. The professor (a researcher, not lecturer, by trade) didn't really have a curriculum, and said this artifact accounted for 70-80% of our grade. Trying to compile Firefox was already a challenge. That, and each compile took an hour. IIRC, Firefox is built on some esoteric architecture / design pattern that's def…

> Trying to compile Firefox was already a challenge. That, and each compile took an hour. At first glance, this sounds terrible. But when compared to software projects of comparable size, Firefox is hardly unique. Compare to compiling Chromium for example, or even the Linux kernel.

Those are all very different levels of difficulty IMO:

Linux is almost trivially easy, only slightly harder than the usual configure && make and has very few dependencies.

Firefox is pretty painful but it's doable with a decent amount of care and bandwidth.

Chromium is a fairly typical google project where the recommended first step to building it is to become a google employee but some alternative workarounds are also available if that's not practical.

Re: Engineering code quality in Firefox

#119

Earlier quoted context omitted.

The WebKit team is smaller than the corresponding team at Mozilla, even if you look at the subset of of identical roles across both organizations (and e.g. ignore those working on the Firefox network stack). That said, it's worthwhile remembering that WebKit does very much maintain all the abstractions to be cross-platform (and Apple do still maintain a Windows port), even if it does try and leverage plenty of OS lib…

as of the last time i recall the window server had some special treatment for safari to try to optimize various things -- is that true?

I'm unaware of any special treatment (but that doesn't mean there is none!), beyond Apple caring about battery life in general on their OS and I would strongly expect that the browser forms part typical-use testing of the OS and as such influences what parts get targeted for performance work.

Certainly Apple's WebKit port uses Core Animation heavily, which is definitely heavily tied to the compositor in the window server.

Re: Engineering code quality in Firefox

#120
post #52

Earlier quoted context omitted.

The WebKit team is smaller than the corresponding team at Mozilla, even if you look at the subset of of identical roles across both organizations (and e.g. ignore those working on the Firefox network stack). That said, it's worthwhile remembering that WebKit does very much maintain all the abstractions to be cross-platform (and Apple do still maintain a Windows port), even if it does try and leverage plenty of OS lib…

Safari for Windows is discontinued isn't it?

Yes. But as sibling comments said, iTunes and iCloud both use WebKit.
Post reply on HN