Live data from Hacker News

Engineering code quality in Firefox

hacks.mozilla.org

81–90 of 155 posts

Re: Engineering code quality in Firefox

#81
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.

I had to compile linux once and I found the process to be trivial. My distro had a guide for how to do it and then how load the kernel in to grub and it was basically just copy/paste

Re: Engineering code quality in Firefox

#82
post #75

Earlier quoted context omitted.

Actually, they were an industry researcher coming in as a guest lecturer.

Are you sure he doesn't employ the same tactics instead of actual research? (I am generally suspicious of anyone who voluntary pursues academia)

Don't be salty, man, no offence, academics need love too. I'm not even by far academic, academical, but, let's keep it cool, man. No offence or intent to be hostile.

Re: Engineering code quality in Firefox

#83

> Our next major challenge: We are dealing with 21 million lines of code. I think I just fail to understand the true complexity of a browser, but how is Firefox 21 million lines of code? How can a browser be 21 million lines of code? That just seems so large for what a browser does.

Modern day browsers are essentially VM with rich customizable GUI.

This is something I really deplore about the state of modern software development. Taken collectively, it's mind-boggling the amount of waste there is in terms of memory and CPU (i.e. energy) usage by running a huge portion of consumer software in the browser. We could achieve the same result so much cheaper, with better performance and UX, by putting a serious effort into a set of standards for handling code from an arbitrary source securely.

Re: Engineering code quality in Firefox

#84
post #4

I was thinking about Firefox development quality while trying to figure out why the f does Firefox CPU usage fluctuate between 1 and 5% with one background tab open and only one plugin installed (containers). The same URL when opened in safari goes to 0.1% or 0.0. I tried to look up dom timeout config settings and tried to set aggressive timeouts, but in the end I gave up. There must be something fundamentally wrong…

If you want to find out yourself, I can highly suggest using the Firefox Profiler on https://profiler.firefox.com/ - amazing tool!

Re: Engineering code quality in Firefox

#85
post #30

I am glad they are looking into this: Sorry for the following rant, but I really don't think of Firefox browser when I think of code quality. (Still don't even though it has improved a lot in some areas). When it comes to browsers, I still feel the old Opera browser (presto), that had more features, was blazing fast and small in size (in memory) is a very good example of a finely engineered software. In the early ver…

Opera felt small and fast because it did less and ran websites doing less. If you look at an old site in a modern browser, it's much faster; if you even could run a modern site in an old browser, you'd see just how many optimizations you're taking for granted — not to mention things like high-quality text rendering which fully supports Unicode and complex scripts.

The machines you were likely running Opera on were a lot less powerful though. Doing a bit less on a Pentium IV might be more impressive than rendering a modern website on an i5.

Re: Engineering code quality in Firefox

#86
post #83

Earlier quoted context omitted.

Modern day browsers are essentially VM with rich customizable GUI.

This is something I really deplore about the state of modern software development. Taken collectively, it's mind-boggling the amount of waste there is in terms of memory and CPU (i.e. energy) usage by running a huge portion of consumer software in the browser. We could achieve the same result so much cheaper, with better performance and UX, by putting a serious effort into a set of standards for handling code from an…

> a set of standards for handling code from an arbitrary source securely

That is what html+js is. Why do you presume a different standard would be more efficient in the end?

Re: Engineering code quality in Firefox

#87
post #75

Earlier quoted context omitted.

Are you sure he doesn't employ the same tactics instead of actual research? (I am generally suspicious of anyone who voluntary pursues academia)

> I am generally suspicious of anyone who voluntary pursues academia That's very unfair imo. The majority of people I know in academia don't fit this profile at all. There is obviously disappointing stuff happening, but people generally still are working/teaching in good faith.

The main problem in academia is that people still can be harmful even being in good faith. (remember that "road to hell" saying, right?)

Re: Engineering code quality in Firefox

#88
post #87

Earlier quoted context omitted.

> I am generally suspicious of anyone who voluntary pursues academia That's very unfair imo. The majority of people I know in academia don't fit this profile at all. There is obviously disappointing stuff happening, but people generally still are working/teaching in good faith.

The main problem in academia is that people still can be harmful even being in good faith. (remember that "road to hell" saying, right?)

> people still can be harmful even being in good faith

That's a general truth. You make it sound like people choose academia to somehow cheat the system and profit from free student's work or whatever. Make a real case for you thesis then.

Re: Engineering code quality in Firefox

#89
post #87

Earlier quoted context omitted.

The main problem in academia is that people still can be harmful even being in good faith. (remember that "road to hell" saying, right?)

> people still can be harmful even being in good faith That's a general truth. You make it sound like people choose academia to somehow cheat the system and profit from free student's work or whatever. Make a real case for you thesis then.

People choose academia to be within (zero-sum) system and project the same expectations to students, while real life success is about being out of any system. Hence the harm.

Re: Engineering code quality in Firefox

#90
post #47

Earlier quoted context omitted.

> But let's not forget that Opera browser earned its reputation for being blazing fast, its tiny size and its low memory consumption on the desktop platforms long before it became a popular browser on the mobile platform. Just about all of the major browsers earned their reputation for being blazing fast, tiny, and using little memory. And those attributes are well-deserved at their launches. Then real-world pressure…

> Just about all of the major browsers earned their reputation for being blazing fast, tiny, and using little memory. Not like Opera though who made performance and small size (and power optimizations) as their core philosophy. (This was the browser whose popularity even frightened Microsoft, whose infamous Internet Explorer had I think nearly 80% market share at the time. So much that they deliberately ensured that…

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.

Post reply on HN