How Maintainable Is the Firefox Codebase?
An anonymous reader writes "A report released this morning looks at the maintainability level of the Firefox codebase through five measures of architectural complexity. It finds that 11% of files in Firefox are highly interconnected, a value that went up significantly following version 3.0 and that making a change to a randomly selected file can, on average, directly impact eight files and indirectly impact over 1,400 files. All the data is made available and the report comes with an interactive Web-based exploratory tool."
The complexity exploration tool is pretty neat.
>> A number of modules, namely, accessible, browser and security, frequently appear among the most complex modules. Further investigation may be helpful in identifying why that is the case.
Does this guy know what Firefox is?
It finds that 11% of files in Firefox are highly interconnected
Figures like this would be more useful if they were put in context. What is a "normal" level for connectedness? What is the level for the Linux kernel, or for GCC? Compared to other similar sized projects, is 11% good or bad?
Well, to deal with this is to fork Firefox, and start with a real simple browser - no tabs, plugins, add-ons, etc.... - and call Firechick, or Firepup, or SparkFox, or SparkPup, or AweFuckit!We'reStartingOverFox
Is there actually a trojan on the site?
MSE says this bugger is present on the site: http://www.microsoft.com/security/portal/threat/encyclopedia/entry.aspx?name=Trojan%3AJS%2FIframeRef.K&threatid=2147679863
Aint actually a law its more like guidelines...
Looking at dependancies from the perspective of file level seems like a mostly arbitrary and useless means of demarcation to me.
If your Mom goes there, I sure hope so!
and tomorrow we'll count the lines of code and spew more meh
It's OK, we can fix it by hacking together a bunch of Perl scripts!
Considering that MSE takes even longer than Clam to identify new ANYTHINGS, I'm not sure how much stock I put in that report.
THL phish sticks
is it a coincidence that 3.0 is when they started versioning up like crazy every two weeks? I think not!
I am wondering how this stacks up to a project like WebKit/Blink, as well as seeing that project against the original KHTML. Sure it is a renderer/HTML layout/JavaScript engine only, and won't contain the browser chrome like Firefox, but I think it would be interesting to look at.
Many people have also suggested that WebKit is easier to embed into various different environments (more so than Gecko) and that it has been able to evolve faster mainly due to the code base being cleaner, and I wonder if this holds true when looking at it from a complexity standpoint, or is it more complex but simply laid out better and in a way that is easier to understand?
cat
OK let's start with:
noscript anybody?
I loaded it. And every single website I use - like my library, credit union, broker, SLASHDOT, Amazon, etc ... will not work correctly without their scripts running. I can't even login without having to "Allow all scripts''
Why "Allow all..." because, every goddamn website calls a myriad of different other websites for god knows what the fuck they're doing.
I TRIED to selectively whitelist websites and all I got was half functional shit- and not being able to access my account many times.
I mean really Web "Engineers" - WTF?!?!
It seems that every one of you point call asshole like google analytics and other advertizing shitholes.
And this social media shit. I mean really, do you have to have those stupid fucking buttons for Facebook, Google+, and every other narcissistic fucking web site out there?!?
Hey kids! Wanna get rich quick!?
Start your own business that caters to societies insatiable need for narcissism: See Apple, Harley Davidson, every luxury car or product maker out there, Facebook, Google+, every goddamn reality show, people registered on Slashdot, the real loosers who are registers under their Google+ or Facebook accounts, ....
Appeal to people's vanity and get rich.
At least the Christian myth about Satan is correct: people are suckers for the 7 deadly sins.That's how to get rich! Follow Satan!
See every TV preacher that has ever existed
And you realize that all those features add on to the codebase, riiight?
And you realize that adding to the code base adds on to its complexity, riiight?
ANd you realize the GP was being sarcastic, riiight?
And you realize that you come across as a condescending ass, riiiight?
I await your ad hominem with pleasure so I can crush you your feeble intellect with my mighty logic.
According to recent comments (continued on the next day's thread), the win32 compiler that Mozilla use is approaching the 4GB limit, after which LibXUL (which Firefox depends upon) will no longer compile.
It's currently at 3.5GB, and at the current rate, will reach the limit in approximately 6 months: Chart of memory usage of LibXUL during last 90 days
While I think that Servo will produce a more decentralised design than Gecko and XUL, the memory limit will be reached well before that. With Windows XP support ending next year, Mozilla should consider migrating to x64 as soon as reasonably possible, keeping x32, but focusing on stripping large and extraneous code above new features.
Really? The version number thing again? Hasn't that been played out yet? Incidentally, 3.0 is not even close to when they moved to a rapid release cycle.
For some web application or something similar trivial, i would care.
However, a full featured modern web browser is in no way trivial. AI, compiler building, an own network stack, several rendering backends, a dozen of parsers, a GUI system and a very complex plugin system are involved; at least.
A complete web browser is literally (yes, literally) an operating system on top of your operating system; one can be happy if the code is somewhat not total crap.
... that have no meaning at all.
Impacting 8 files on average would be horrible... for a project with 8 files. But how many is that relative to the size of Firefox?
11% of files in Firefox are highly interconnected... but how does that compare to other projects of similar scope?
The one value in that summary that had any meaning at all was the comment that the percentage of interconnected files "went up significantly following version 3.0". That at least has some relative measure we can use as a base.
Firefox is forthing me to update the flash player, even if *I know* that I only visit one web site with flash on it with it. ... don't know which version? You can not disable autoupdate anymore. Unfortunately the developers believe they may change look and feel arbitrarily.
In other words: it refuses to work. (That means I have to shut down all other browsers with roughly 100 tabs/windows, unacceptable!)
Since
I for my part use an very old firefox for one specific web site. Otherwise I use Chrome and Safari and consider to try Opera again.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
I gave up on Firefox around version 1.4 when it became clear it was no longer anything like the lean, mean lightweight browser I was looking for, and once was it's apparent target. The bloat factor caused it to become irrelevant after that.
It's a real problem. The Firefox dev team gave up on running add-ons in a separate process (the "electrolysis" project) because the code base was too single-thread oriented. Remember, some of the code dates back to Netscape. There's talk of reviving that project now, but it's mostly talk and meetings.)
Refitting concurrency tends to be very hard and the result tends to be ugly. You get something like Windows 3.x or MacOS 6/7, where easy things are complicated for the wrong reasons.
There's no such thing as a (non-trivial) acyclic graph. A non-trivial acyclic digraph however...
There are lots of measures of a code's "maintainability", with interconnectedness being just one of them.
More to the point, that's what code tests are for: to make sure changing one thing doesn't break another. Talking about the "health" of the code base without knowing about test coverage or effectiveness is pretty damned meaningless, regardless of "interconnectedness". My view is that Ali Almossawi's paper is therefore a waste of dead trees.
The report is actually correct. Microsoft Security Essentials (which is actually a great antivirus) thinks there's some funky IFRAME code that might redirect to a malicious website. When that threat was analyzed the target servers were unreachable though.
Oh the history - the netscape codebase being so complex a complete re-write was necessary...
I'm not compiler-knowledgeable. I've heard that the current mem usage is high partially due to "profile guided optimizations", but...
why does the compilation process for a browser of a few hundred megs require 4GB of memspace?
Honestly, I'd like to get some insight - can anyone here provide "a layman's guide to mem usage by the linker"?
The conclusions of the research are very positive and shed a very good light on the health of the code. Why is everyone commenting like the conclusions are the opposite?
But what if she prefers Durex?
Many people have also suggested that WebKit is easier to embed into various different environments (more so than Gecko) and that it has been able to evolve faster mainly due to the code base being cleaner, and I wonder if this holds true when looking at it from a complexity standpoint, or is it more complex but simply laid out better and in a way that is easier to understand?
Dave what's-his-name (can't remember his last name, but one of the original authors of Phoenix/Firefox who moved to Apple and turned KHTML into Webkit) said that the Gecko codebase was "baroque" (cue jokes about how baroquen it is), but that a lot of how convoluted it was had to do with how far it went to try to make sense of broken HTML. He specifically said there's a lot of stuff Gecko can handle that Webkit can't because they're rare edge cases and allowing for them complicates the code badly.
Yes, I can hear the Apple fanbois already starting to froth at the mouth. Take it up with Dave, he said it.
I also remember some complaining about a Firefox developer making changes to Gecko in an attempt to make his own development easier which made it much more Firefox-specific than it had been or was supposed to be. Prolly find references to it with Google if you really wanted to.
Good dog - sit!
Webkit may be better documented. I tried to find documentation on Gecko and it was very limited, I gave up on it.
Well if the fate of Camino with Gecko is anything to go by: not very.
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
The bigger question, at least to me, is this:
Why are we, despite huge drive space and fast processors, allowing our coding to become so sloppy and monolithic that we have forgotten the basic tenets of programming. I remember in college reading a book about UNIX. I've never forgotten where the author describes one of the key tenets of UNIX being "let each program do one thing well".
Browsers have become so big, bloated, and their collective authors try to incorporate so very much--too much--into a program designed to render HTML and JavaScript.
I'll likely get flamed for this, but I truly miss the minimal, the tenets upon which I learned how to use UNIX and appreciate it's simple yet powerful abilities. Just saying...