Live data from Hacker News

Engineering code quality in Firefox

hacks.mozilla.org

101–110 of 155 posts

Re: Engineering code quality in Firefox

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

>but people generally still are working/teaching in good faith.

It depends on university. On mine, most professors just see it as a job, something that one must endure until it's over. And when you bring to attention that what they're lecturing is incorrect or not proven they don't really care, again not all, but most, at least on my university. Just today I reminded the professor that there is a difference between a theory and hypothesis, their response was that they don't know if the theories they're teaching were tested or proven, but they are teaching this because that's what's written in the book...

That made me really sad, it's already hard to stay motivated to not leave the university because you need a certificate of a higher education to be taken seriously, but such behaviour from professors makes it even harder.

I've already expressed my worries to those in control of courses and they say that they understand but can't do much to change things because the curriculum that we have was accepted by the government.

Here in Slovenia people that work in the universities are paid by the government regardless of how happy or unhappy the students are, which is probably the reason for the situation in which we are...

Re: Engineering code quality in Firefox

#102
post #83

Earlier quoted context omitted.

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…

The biggest thing you would probably be sacrificing is development time for every engineer involved. The html/css/js stacks have had unimaginable amounts of manpower invested, more so than any UI stack in history. This has made them much easier to learn and manipulate. Throwing away all of that would be a very hard sell.

I agree there would be an adoption problem for something new. But if there were a viable alternative, and people managed to build killer apps on it might be possible to draw adoption over time as people got to experience the superior performance.

Re: Engineering code quality in Firefox

#103

Earlier quoted context omitted.

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

> 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 really caving? 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 maybe then we would have some real competition in this space too as a new plug-in war would have developed ...

> But Firefox users still have to opt-in to install the binary blob (eg. Widewine), it's not bundled in the browser.

That's not true - it's been opt-in by default for a long time. See here - https://imgur.com/a/iCTmnzN ...

I think since EME free versions were released, at some point a policy decision was taken to make it "opt out" in the usual general releases, as a technical person would rather opt for the EME Free version or go through the options and disable it if they so desired, where as a non-technical user might get confused about EME or DRM or plug-ins ...

I fear that the Google DRM binary blob has actually made it much easier for them to uniquely fingerprint every Firefox user with EME / Widevine despite all the ad-blockers and anti-fingerprint extensions or techniques being used. In other words, I fear that Firefox (knowingly or unwittingly) has aided Google in killing privacy on the web.

Re: Engineering code quality in Firefox

#104
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…

JS is generally very fast because these monolithic VMs have had so much money poured into them that their optimisation process is unparalleled. V8 can sometimes get performance on par with C. "Overhead" is arguable, JS may be garbage in a lot of ways but modern JS is quite efficient.

Re: Engineering code quality in Firefox

#105
post #91
post #66

Earlier quoted context omitted.

> 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 think at scale (according to Wikipedia the 5.6 release has ~33M lines of code) the Linux kernel might be one of the easiest (and quickest) projects to compile[1]. [1]: https://techgage.com/wp-content/uploads/2019/11/Compile-Perf...

I haven't compiled my own kernel in at least 15 year but I remember it was quite easy (is make menuconfig still the way to go?). I did have much more free time though.

Re: Engineering code quality in Firefox

#106
post #83

Earlier quoted context omitted.

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?

HTML+ECMAScript keeps the developer at quite a distance from the hardware, and it imposes all kinds of limitations which don't have to exist.

The web is good enough for pure content delivery, but for more advanced interactive applications, the limitations are a huge waste. For instance, I have a computer at home with a 12-core, 24-thread processor, but web applications are basically single-threaded with some very limited support for web workers. I'm also limited to basically one language, which is garbage collected, so performance and memory usage are significantly worse than they could be. And as far as graphics, you're limited to WebGL which is ages behind the state of the art in terms of graphics APIs.

Basically there is a whole universe of tools out there for software development, but if you want to target web you're limited to a handful of poorly performing, hacky options.

For my work, we use several web applications to collaborate. As someone who works on highly optimized user-facing software, it's frustrating to understand how poor these web applications perform given the potential of modern hardware.

The reason we use them is because you can send anyone a link, and they're into the software in one click. There's no reason we couldn't have the same experience for native software, where when you click the link your computer downloads a native binary and runs it in a sandboxed environment against a standardized system API. It would take a lot of careful work and planning, but there's no technical reason it couldn't exist, and it would be so much better for developers and users.

Re: Engineering code quality in Firefox

#107
post #77

Earlier quoted context omitted.

Google Calendar has had some serious issues with doi g something weird in the background. At some point Google search results page also would spinn up one core on my machine one or twice a minute if left unattended but last I saw that was years ago. (FWIW I don't use Google search much these days, so it might slip by without me noticing.)

I don’t understand why tabs are allowed to mindlessly peg CPU, especially after the wave of crypto miners

This is beyond me as well but I chalk it up to our entire field being immature, which means there are endless possibilities and endless chaos.

IMO background activity should need an extra permission similar to notifications and geolocation.

But we need to sort out UX (and start punishing the companies that "misunderstand" GDPR to mean they just need to add another popup) as it is starting to get bad now.

BTW, this needs to be fixed across a number of situations. There's no reason why I would want to allow a build tool to access all my projects just because I want to allow it to access one project. (Github and Azure Devops, I'm looking at you)

Re: Engineering code quality in Firefox

#108
post #83

Earlier quoted context omitted.

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…

JS is generally very fast because these monolithic VMs have had so much money poured into them that their optimisation process is unparalleled. V8 can sometimes get performance on par with C. "Overhead" is arguable, JS may be garbage in a lot of ways but modern JS is quite efficient.

sometimes is the key word there. It's amazing what kind of performance can be reached with JS given the monumental amount of effort which has gone into optimizing it, but there are structural reasons JS hsa a performance ceiling. JIT compilation can't change the fact that it's a highly dynamic, weakly typed language which is garbage collected. You might be able to find examples where a JIT compiled block of JS code performs comparably to a similar block of C code, but there are design patterns available in languages like C/C++ and Rust which aren't even expressible in JS which allow an extremely high level of optimization using careful memory management techniques.

Also web is basically a single-threaded runtime environment. For the foreseeable future, increased parallelism is the main way we can expect to get increased computing performance, and it's basically not available on the web.

Re: Engineering code quality in Firefox

#109
post #89

Earlier quoted context omitted.

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

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

Re: Engineering code quality in Firefox

#110
post #109
post #89

Earlier quoted context omitted.

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.

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).
Post reply on HN