News for hackers. Stuff that matters.
Re:Chrome Binary Size by mtigas on Monday September 20, 2010 @08:59PM (#1711064)
I do have to point out that this visualization represents the binary executable size of Chrome, not the source tree. (According to another comment, it's generated with http://github.com/martine/bloat .)

Noticed a lot of folks linking to directory treesize visualizations.

This — breaking down a compiled binary to show the size of it’s constituent components — is a ton more interesting to me.

Re:Chrome Binary Size by Lerc on Monday September 20, 2010 @09:59PM (#1711191)
...and yet it includes header files. curious.

Looking at what's there, it looks like it can compile and run C (in nativeclient?).

Re:Chrome Binary Size by caf on Tuesday September 21, 2010 @01:13AM (#1711555)
It's possible to define symbols in header files (for example, inline functions).
Re:Chrome Binary Size by _delirium on Tuesday September 21, 2010 @01:42AM (#1711602)
I thought the way the C preprocessor worked, those ended up getting literally copy and pasted into the .c file that #include'd them, and should be indistinguishable from the case where you wrote them directly in the .c file? Or does gcc keep track of where #include'd files came from, and write that info into the binary?
Re:Chrome Binary Size by parbo on Tuesday September 21, 2010 @03:06AM (#1711782)
Yes, otherwise you'd never find syntax errors in the header files.
Re:Chrome Binary Size by scott_s on Tuesday September 21, 2010 @05:42PM (#1714207)
But that's during the compilation phase - this is the compiled binary. Binaries that are compiled with debugging information turned on will include this information for a similar reason: so that when you're debugging a program, or when it breaks, you can map that to places in your source file.
Re:Chrome Binary Size by caf on Wednesday September 22, 2010 @12:11AM (#1715143)
Right - and `nm` uses the debugging information to identify the file:line where each symbol was defined. The original scripts used to generate the treemap use `nm`.
Re:Chrome Binary Size by illumen on Tuesday September 21, 2010 @04:14AM (#1711877)
yes, and no. Whole program optimization kinda changes that. So do precompiled headers etc. Also chrome is C++.
Re:Chrome Binary Size by mfukar on Tuesday September 21, 2010 @05:14AM (#1711959)
Could be precompiled headers, inline functions, etc.
Re:Chrome Binary Size by mrdoob2 on Monday September 20, 2010 @08:22PM (#1710989)
Re:Chrome Binary Size by avar on Tuesday September 21, 2010 @06:17AM (#1712048)
I patched it to support generation on 64 bit systems: http://github.com/martine/bloat/issues#issue/1
Re:Chrome Binary Size by ZeroGravitas on Tuesday September 21, 2010 @05:34AM (#1711985)
What does Chrome use Speex (a low-bitrate voice codec) for?

edit: answering my own question, a speech-to-text in HTML proposal from Google

https://docs.google.com/View?id=dcfg79pz_5dhnp23f5

http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-May...

http://www.jeremyselier.com/entry/speech-attribute-demo

Re:Chrome Binary Size by senko on Tuesday September 21, 2010 @09:51AM (#1712559)
Chrome also incorporates libjingle, Google's library for ICE-like RTP handling, used in Google Talk / Google Video, which also uses Speex for voice part.
Re:Chrome Binary Size by scott_s on Monday September 20, 2010 @09:19PM (#1711115)
This is an amazing visualization, but I don't like using the term "bloat." What would you take away? Keep in mind that Chrome's architecture is purposefully approaching that of an operating system.
Re:Chrome Binary Size by WalterGR on Monday September 20, 2010 @10:08PM (#1711209)
I don't like using the term "bloat."

It's an extremely non-specific term that people use to describe software they don't care for, much as people cast arguments they don't like as "FUD".

I was in a conversation with someone who said he felt IE 9 was bloated. I asked him why. "The right-click context menu is too big."

"Uses too much RAM", "requires too much disk space", and "has too many dependencies" can all be valid complaints. But it seems that in most uses, "bloat" = "has one or more features I don't use."

Re:Chrome Binary Size by othermaciej on Monday September 20, 2010 @10:37PM (#1711263)
Having too many features is valid usability complaint. In fact, it probably harms the user quite a bit more than "requires too much disk space".
Re:Chrome Binary Size by palish on Monday September 20, 2010 @11:07PM (#1711326)
In practice, not really. People just ignore what they don't use.
Re:Chrome Binary Size by othermaciej on Tuesday September 21, 2010 @02:20AM (#1711681)
In practice, yes really. Simplicity is one of the basic principles of good Human Interface design. User testing bears out that users find it hard to do even basic tasks with a more complicated program.

Now, sometimes it is possible to add features in a way that is unobtrusive enough that it doesn't affect usability for basic tasks. But it's a tough design challenge to do this, not a given.

By the way, I think Chrome overall does a pretty good job of design simplicity. But the "just ignore the features you don't want" argument is not a good basis for HI design.

Re:Chrome Binary Size by sgift on Tuesday September 21, 2010 @03:13AM (#1711796)
> But the "just ignore the features you don't want" argument is not a good basis for HI design.

It is a good basis if you can find out (as the HI designer) which features most people don't want: Then you can put them into places for advanced users, where they wait for the moment people need them. IMO the "simplicity" of many programs is just a crutch for HI designers unable to design a usable interface with more features.

Re:Chrome Binary Size by ugh on Tuesday September 21, 2010 @07:20AM (#1712158)
Do you really believe that it is possible to create arbitrarily simple interfaces for programs with arbitrarily many features? That seems unlikely to me. It seems much more reasonable to me that there is a correlation between the number of features and the complexity of a program.
Re:Chrome Binary Size by Lerc on Monday September 20, 2010 @11:51PM (#1711397)
They also don't use what they can't fathom. A plethora of options can make it difficult for a new user to find the features they want.

Yes they do ignore the unwanted features, but they also ignore features they would use if they knew about them. In that respect the notion of bloatedness is even amplified because a larger portion of the software is provided but idle.

Re:Chrome Binary Size by jmtulloss on Tuesday September 21, 2010 @02:17AM (#1711675)
Why do you believe this?
Re:Chrome Binary Size by billiob on Monday September 20, 2010 @10:36PM (#1711260)
It's useless to have N versions of the same library on your system. I prefer that my favorite distro takes care of updating one particular library if there is a security bug than having to wait for google to take care about it. It's what is done in gentoo: http://phajdan-jr.blogspot.com/2010/08/www-clientchromium-no... Currently, it uses the system libraries for:

• bzip2,

• codesighs,

• cros,

• icu,

• jemalloc,

• lcov,

• libevent,

• libjpeg,

• libpng,

• libxml,

• libxslt,

• lzma_sdk,

• molokocacao,

• ocmock,

• pyftpdlib,

• simplejson,

• tlslite.

As TODO, there is still zlib due to an issue during compilation.

It would also be great to have V8 as a different project so that it could be used outside of chrome with much less pain.

Re:Chrome Binary Size by bnoordhuis on Tuesday September 21, 2010 @06:48AM (#1712091)
> It would also be great to have V8 as a different project so that it could be used outside of chrome with much less pain.

http://code.google.com/p/v8/source/browse/trunk/ ?

Re:Chrome Binary Size by est on Tuesday September 21, 2010 @03:11AM (#1711794)
or type about:credits in your chromium address bar
Re:Chrome Binary Size by mcbain on Monday September 20, 2010 @10:00PM (#1711193)
That chunk of "third_party" stuff is a pretty tempting target.

Instead of using shared libs - like those that you've probably got on your system already - Google appear to like slurping everything into the one blob to solve dependency/versioning issues.

Re:Chrome Binary Size by cperciva on Tuesday September 21, 2010 @04:41AM (#1711910)
That chunk of "third_party" stuff is a pretty tempting target.

Not all of it. Part of the third_party code is a modified version of bsdiff, and as the bsdiff author I specifically endorse the shipping of modified versions of bsdiff with the software which required the modifications.

Re:Chrome Binary Size by _delirium on Tuesday September 21, 2010 @01:43AM (#1711607)
It's probably not a terrible default, given their cross-platform development. Slurping everything into your app bundle is the official way of doing it on OS X anyway, and more or less the only sane way of doing it on Windows, whose DLL-versioning is notoriously bad. So if they were doing any factoring out of shared libraries, it'd be solely for the Linux version, which I could see them not considering worth the hassle.
Re:Chrome Binary Size by blasdel on Monday September 20, 2010 @09:43PM (#1711158)
Please stop repeating that canard, it got old years ago: http://news.ycombinator.com/item?id=297297
Re:Chrome Binary Size by scott_s on Monday September 20, 2010 @11:20PM (#1711343)
I thought that analysis was ridiculous the first time I read it. I read Chrome's design docs when they were released. Chrome's design is approaching that of an operating system. Considering that it has to manage processes, there is no alternative.
Re:Chrome Binary Size by blasdel on Tuesday September 21, 2010 @01:26AM (#1711572)
But that's the thing, it's only managing processes, not scheduling them nor managing the minutia of their stacks — it devolves that responsibility to the real kernel by using 'dumb' native processes instead of inventing its own fucked coroutines with a browser-wide GIL for all the logically-independent javascript environments.

It is less OS-like than any other major browser!

Re:Chrome Binary Size by scott_s on Tuesday September 21, 2010 @09:45AM (#1712538)
Correct, it is not an operating system. Just as the Java Virtual Machine is not an operating system. But when you start using principles and common designs from operating systems, you are approaching the design of an operating system.
Re:Chrome Binary Size by argsv on Monday September 20, 2010 @10:17PM (#1711229)
Re:Chrome Binary Size by blasdel on Monday September 20, 2010 @10:23PM (#1711237)
I'm actually waiting to buy a Netbook until it comes out, in the vain hope that someone will ship a decent ARM-based system using it.

But it is just slightly-extended Chrome running directly in X unparented without the standard Gnome Desktop BS on otherwise stock Ubuntu.

Re:Chrome Binary Size by aaronblohowiak on Monday September 20, 2010 @10:35PM (#1711257)
tmux+vim+chrome is all i really need. (and a full posix system down below, of course)
Re:Chrome Binary Size by blasdel on Monday September 20, 2010 @10:39PM (#1711268)
What I want is NaCL implementations of urxvt+SSH and VNC/RDP.

I don't need yet another local posix system to maintain, I want remote access to my real server where my main screen session lives, and I want that access to live in a tab.

Re:Chrome Binary Size by aaronblohowiak on Monday September 20, 2010 @11:34PM (#1711364)
you can get vnc over html5, thought it may not be as fast as you'd like.
Re:Chrome Binary Size by asmosoinio on Tuesday September 21, 2010 @05:33AM (#1711983)
The term "bloat" is not used anywhere else than in the URL.
Re:Chrome Binary Size by gjm11 on Tuesday September 21, 2010 @06:10AM (#1712039)
And it looks to me as if the only reason it's even in the URL is that that's the name of the tool he wrote to extract and display the information.
Re:Chrome Binary Size by thehodge on Monday September 20, 2010 @07:54PM (#1710934)
This is a pretty awesome way to visualise filesizes of various things... never seen it before..
Re:Chrome Binary Size by stilist on Monday September 20, 2010 @07:57PM (#1710942)
Re:Chrome Binary Size by mcantelon on Monday September 20, 2010 @08:11PM (#1710973)
...And for the Windows community: http://www.sixty-five.cc/sm/

Is there a Linux equivalent?

Re:Chrome Binary Size by junkbit on Monday September 20, 2010 @09:46PM (#1711164)
You can get a pretty interactive treemap of the linux filesytem using http://gdmap.sourceforge.net/

[screenshot] http://gdmap.sourceforge.net/img/gdmap-preview.png

You can also see a treemap of the kernel although it is static http://www.cs.umd.edu/hcil/millionvis/Treemap_Visualization_...

Re:Chrome Binary Size by sparky on Monday September 20, 2010 @08:38PM (#1711019)
Re:Chrome Binary Size by slug on Tuesday September 21, 2010 @01:17AM (#1711560)
Someone is working on a kde4 port, see comments at http://kde-apps.org/content/show.php/KDirStat?content=10159

Gnome also comes with something similar.

Re:Chrome Binary Size by eklitzke on Monday September 20, 2010 @08:57PM (#1711060)
In addition to the standard 'du' command, which you can sort and munge with the standard unix stuff, Gnome has bundled the 'baobab' utility for the last few releases (so if you're on a relatively recent Gnome release, you probably already have it installed). It has an interactive "rings" view and a "treemap" view, which are both pretty nifty.
Re:Chrome Binary Size by ZeroGravitas on Tuesday September 21, 2010 @08:42AM (#1712373)
In Ubuntu the default "Disk Usage Analyser" (the projeect name is "Boabab") in Applications -> Accessories does this.

By default it's a ring chart but there's a menu to select treemap instead. The authors seem to believe that treemaps are good for comparing only size, but the ring chart shows hierarchy well too.

http://www.marzocca.net/linux/baobab/baobab-ringschart.html

http://www.marzocca.net/linux/baobab/baobab-treemaps.html

Re:Chrome Binary Size by ChRoss on Monday September 20, 2010 @08:23PM (#1710992)
I use WinDirStat for Windows http://windirstat.sourceforge.net/
Re:Chrome Binary Size by xutopia on Monday September 20, 2010 @08:15PM (#1710978)
du -hs /home/* | sort -k 1,1

/edit typo

Re:Chrome Binary Size by _delirium on Monday September 20, 2010 @09:01PM (#1711068)
Hmm, that and the Mac and Windows utilities linked don't seem to be doing what's needed to generate this Chrome view, though. The Chrome binary is a single file on disk, and this treeview is digging into it to figure out which components contribute to the final size of the statically linked binary.
Re:Chrome Binary Size by decklin on Monday September 20, 2010 @09:37PM (#1711145)
I've always stuck with du | xdu. Except for the primitive rendering it is rather reminiscent of webtreemap (or vice versa, i guess) -- click to dive down, top to go back up.
Re:Chrome Binary Size by tonfa on Tuesday September 21, 2010 @06:48AM (#1712089)
For Gnome, it's called baobab (in Applications -> Accessories -> Disk Usage Analyzer).
Re:Chrome Binary Size by mcantelon on Monday September 20, 2010 @08:13PM (#1710977)
Re:Chrome Binary Size by acqq on Monday September 20, 2010 @10:35PM (#1711258)
For displaying files on the disk it's actually patented.

http://www.patentstorm.us/patents/5987469.html

Estimated Expiration Date: May 13, 2017

Re:Chrome Binary Size by troutwine on Monday September 20, 2010 @11:52PM (#1711401)
Interesting. My first thought on finishing your post was "How rude; you've tainted us all with the knowledge of a that patent." Evidence of manners in the making I suppose; adaptation of custom in the face of seemingly immovable, shared burdens.
Re:Chrome Binary Size by WalterGR on Tuesday September 21, 2010 @12:30AM (#1711480)
"How rude; you've tainted us all with the knowledge of a that patent."

What is required to prove willful patent infringement? Is "Defendant's web history shows (s)he accessed a web page on which someone claimed the patent existed" sufficient?

EDIT: "Defendant", not "plaintiff".

Re:Chrome Binary Size by acqq on Tuesday September 21, 2010 @06:45AM (#1712084)
In most development scenarios you are actually interested to know which patents can potentially get you sued so please explain how exactly is the awareness of the patent existence of the disadvantage to you.
Re:Chrome Binary Size by duskwuff on Tuesday September 21, 2010 @11:33AM (#1712953)
Wikipedia (http://en.wikipedia.org/wiki/Patent_infringement_under_Unite...):

> If an infringer is found to have deliberately infringed a patent (i.e. "willful" infringement), then punitive damages can be assessed up to three times the actual damages. Legal fees can also be assessed.

If it cannot be proven that an infringer had knowledge of the patent, though, the damages that can be assessed are substantially lower.

Re:Chrome Binary Size by acqq on Tuesday September 21, 2010 @04:49PM (#1714071)
Thank you.

I'd still like to know how can you as the developer and your software survive in either scenario (with or without knowing that you infringe) it the patent covers the basic functionality of your software?

Re:Chrome Binary Size by eitally on Monday September 20, 2010 @08:28PM (#1710999)
Sequoiaview and Treesize are two good, free Windows options. Treesize, in particular, has a prettier output and a ton more features. We install it on all our Windows servers because it makes disk cleanups so much easier.

Here's the free version: http://www.jam-software.com/treesize_personal/

Re:Chrome Binary Size by davidst on Monday September 20, 2010 @10:17PM (#1711227)
Imagine a tool that would take the output of a profiler and render an interactive graphic like this for both: (A) data structure sizes and (B) run-time performance. That would be incredibly useful.
Re:Chrome Binary Size by cma on Monday September 20, 2010 @10:54PM (#1711303)
Re:Chrome Binary Size by davidst on Monday September 20, 2010 @11:48PM (#1711391)
Cool, thanks! Too bad there's not a Windows version, though.
Re:Chrome Binary Size by noibl on Tuesday September 21, 2010 @05:36AM (#1711988)
Re:Chrome Binary Size by gjm11 on Tuesday September 21, 2010 @06:14AM (#1712046)
Seems to be PHP-specific: it processes the output from something called "xdebug 2", which is a PHP extension that dumps detailed information about what your code is doing.

Not quite the same target audience as kcachegrind...