My question sounds a bit dumb.

Usually we are suggested to use existing libraries or frameworks, to avoid reinventing the wheel, or to achieve some "good practices" (e.g. during software distribution).

I'm facing situations in which the library/framework size is way larger than the "executable code". For example, when I write an application written in Java, I may want to bundle libraries like Apache Commons and Guava. For simple applications (e.g. Minesweeper games, calculators, small text editors) the executable size should be well below 500KB. Those libraries are substantially larger than the original executable in size. Then, I need to work further (e.g. removing extra codes while taking care of reflection uses), which is much hassle.

Another example is a client-side web application. Suppose I write my application in HTML + JavaScript + CSS. If users are allowed to (I know this doesn't sound good) drag my index.html into a browser, I can surely distribute all stuffs within a very small size (something like the built-in macOS Calculator can been done within 200KB). However, if I bundle them with Electron, the resulting product will become much larger.

In these cases, should I change my mind (e.g. avoid using Guava, avoid distributing in native form)?

Any ideas are appreciated. Thank you.

1 Answer 1


Why do you think your executable "should" be <500KB? Why do you think you "need to" work to reduce overhead introduced by the size of frameworks?

It's no longer the age of floppy disks. The memory stick is what the floppy disk was when I learnt to program. 1MB used to be almost unimaginably large; after all, it was more information than two novels put together! Nowadays it's rather too small for us to imagine easily. Most other measures of effort or size in computing have inflated in the same way.

Therefore, there's no point in insisting on sub-MB program sizes outside a very small circle of minification enthusiasts. Don't get me wrong, it's thrilling and satisfying to see someone write a working Linux executable in 45 bytes. But it's a deeply nerdy pastime and has no place in professional software development. "Small enough for the requirements" beats "really, really small but expensive as hell to produce" any time.

  • 4
    While this answer is essentially true, this doesn't mean that huge apps are good. There are many memory- or bandwidth-constrained systems. The pain threshold has merely moved, and is now probably around 10–20MB for smallish apps. And most of that will be assets, not code.
    – amon
    Jun 5, 2018 at 9:21
  • 2
    Additionally, one has to consider the absurdity of including code where 90% of such code goes unused. Jun 8, 2018 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.