Torvalds: Linux is "bloated and huge"
By Barry Collins
Posted on 22 Sep 2009 at 08:02
Linux creator Linus Torvalds has branded the operating system's kernel "bloated and huge".
Although it's Windows that's usually fighting off accusations of bloatware from the open-source community, the ever-outspoken Torvalds decided to open fire on his own OS at the LinuxCon conference.
Torvalds claims that the increasing number of features being added to the Linux kernel is fattening the OS beyond recognition. "We're getting bloated, yes it's a problem," Torvalds said, according to a report on Internetnews.com.
In 1994, Linux 1.0 was released with 176,250 lines of code. Version 2.6.30 contains 11,637,173 lines
"I'd love to say we have a plan [to make it slimmer]. I mean, sometimes it's a bit sad and we're definitely not the streamlined hyper-efficient kernel that I had envisioned 15 years ago. The kernel is huge and bloated."
The facts bear out Torvald's claims. In 1994, Linux 1.0 was released with 176,250 lines of code. Version 2.6.30 of Linux, which was released in June this year, contains 11,637,173 lines - 66 times as many as the original. Although it still has some way to go to beat Windows Vista, which reportedly contains 50 million lines of code.
Despite the kernel's expanding waistline, Torvalds insists he's happier with the Linux development process. "I don't spend all my time just hating people for sending me [code] merge request that are hard to merge," Torvalds said. "For me, I need to have a happy feeling inside that I know what I'm merging. Whether it works or not another issue is a different issue."
And he also insists his infamously short fuse isn't growing any longer. "I really enjoy arguing - a big part of my life are these occasional flame threads that I love getting into and telling people they are idiots," Torvalds added. "All my technical problems were solved so long ago, that I don't even care. I don't do it for my own needs on my machine, I do it because it's interesting and I feel like I'm doing something worthwhile."
@Barry Collins
11.6m vs 50m code lines. That's an apples and oranges comparison - you're comparing just the Linux Kernel to the total Vista OS. Surely you should compare the total number of code lines in one of the mainstream Linux distros to Vista??
By rjp2000 on 22 Sep 2009 ![]()
50 million?
I'm sure the Windows kernel is nowhere near 50 million lines of code.
By iwilson on 22 Sep 2009 ![]()
Does number of lines = bloated?
It's a very crude measure to look at a project say "oh, that's got such and such number of lines of code, it's so bloated"
Linux 1.0 was much smaller than 2.6.30 because it does more things. That's just how this works, programs are lists of instructions and the more instructions you give it the more it can do.
You just need a certain number of lines to do certain things, if you want your scanner to talk to your computer you need a certain number of lines to do that, if you want another scanner to talk to your computer you need more.
Why is "lots of code" automatically bloat? It can certainly be a sign of bloat but shouldn't you look at performance or some other metric instead?
By steviesteveo on 22 Sep 2009 ![]()
Envy or confused?
It's even worse than just very crude as some people simply don't want to accept that out there is another operating system and is simply confusing them.
I think that video WINDOWS VISTA AERO VS LINUX UBUNTU BERYL shows enough but that's not enough for some scared people.
Thanks to Dell and other brands Linux is becoming more popular even if it has 4x lesser core lines comparing to system with looooong history and still not very well secured.
By only_exciter on 24 Sep 2009 ![]()
lines = bloated
I think Linus is in a good position to make a judgement.
Your scanner analogy is a good one - a lot of the time when we add new features, we do tend to do it by adding new code, often on optional paths.
Equally, quite often you find bits of code added in for things that are no longer required, but generally people are scared to remove functionality.
Generally speaking, I find that if I really look at some of my existing code, and refactor or rewrite it from scratch in the light of the current requirement, I can usually do it in a third of the size.
Another way to reduce code size, is to use higher-level programming features (closures / lambdas for instance, can really reduce code size, as can using Python or Ruby rather than C). Of course there is usually a performance cost in doing so, which is why OS kernels are almost always written in pure C.
I wonder if Linus is still so harsh on the micro-kernel approach (which keeps drivers, etc, out of the kernel itself). Check the Kernel page on Wikipedia and the links on Microkernels and Linus role in the debate, and maybe also read up on XNU as a comparison - note that XNU has also become more bloated/less micro-kernel based over time.
There are other bloat metrics like cyclic complexity - i.e. how much cross-referencing exists between code modules / classes - or stack depth analysis (how many layers of abstraction do you need?).
By JulesLt on 24 Sep 2009 ![]()
What about the Interpreter?
@Julest: "Another way to reduce code size, is to use higher-level programming features (closures / lambdas for instance, can really reduce code size, as can using Python or Ruby rather than C)."
The number of lines of code in a Python or Ruby script might be fewer than the equivalent C code, but you are forgetting to add the number of lines of code in the Python/Ruby interpreter which is needed to run the code. C, of course, is compiled.
By 6tricky9 on 24 Sep 2009 ![]()
Why not load it up in Word and use 'Find and Replace' to swap all out the line breaks for spaces?
Simples.
By Mark_Thompson on 24 Sep 2009 ![]()
advertisement
- Adobe Dreamweaver CC review: first look
- Huawei Ascend P6 review: first look
- Adobe Illustrator CC review: first look
- Let MPs tell us what they really want ISPs to block
- Adobe Photoshop CC review: first look
- WWDC 2013 and iOS 7 launch: live blog
- Sony VAIO Pro review: first look
- Want child porn blocked? Meet the IWF
- Is it worth upgrading a media centre to Windows 8?
- Flickr redesign: is it enough to tempt photographers back?
- Facebook "click on the photo" scams: how they work
- Three alternatives to Word's spelling and grammar checker
- Google two-step verification: a must for business email
- Microsoft Office and the death of upgrades
- The ICO's shame-faced u-turn on cookies
- Start8 and ModernMix: making Windows 8 work on a desktop
- How to boost your mobile reception
- How to fix Facebook: Social Fixer
- Taking the stress out of WordPress updates
- Where to download free web fonts
Lenovo Reviews
advertisement
Read More
