Justin du Coeur (jducoeur) wrote,
Justin du Coeur

Libraries, libraries everywhere

So on the one hand, I notice that the WAR file for CommYou is now 12,345 K in size. The numbers geek in me find this pointlessly entertaining.

OTOH -- 12 *Meg*?!? Jeez, it is easy for an app to bulk up these days. I mean, IIRC that's something like twice the code size of Thief, a project that consumed many programmers for many years.

Of course, the actual code for CommYou is only a tiny, tiny fraction of that. The rest is all libraries. We're currently including, what? -- a cursory inventory finds 38 libraries so far, ranging from a few dozen K to the better part of a Meg. Libraries for XMPP, for XML, for logging, for JSP, for DB, for all *their* dependencies, and so on. Indeed, I'd be surprised if we're even calling 5% of the code that's included here, since in most cases I'm only using a small chunk of a big library.

It's not really a big deal, of course, but the old-fashioned programmer in me is kind of appalled. (And uploading the bloody WAR does take a fair while.) Here's a question for those more hip to Java development than I -- is there any sort of mechanism for trimming all this bulk down? In the old C++ days, the linker would trim away the paths that were never called. (Indeed, occasionally causing me problems in doing so.) Is there anything comparable now, or does everyone just live with library bloat?
Tags: programming

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded