Libraries, libraries everywhere
Sep. 12th, 2008 03:06 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
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?
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?