5 ms·
Is 90MB really that big when compared against the other types of binaries that would get deployed: containers and VM images? How big is the platform (k8s, docke
by pseudosavant 3y ago
Is 90MB really that big when compared against the other types of binaries that would get deployed: containers and VM images? How big is the platform (k8s, docker, etc) you need installed to run your app? Probably more than 90MB.
- pier25 3y agoDepends. Doesn't seem much for a server but if you want to distribute an executable to your users then 90MB seems huge. IIRC a hello world Go binary is like 2MB.
- metaltyphoon 3y agoYeah but no one distributes hello world.
- georgyo 3y agoIf the base line is 90MB, then it only goes up from there.
- patrickthebold 3y agoThe question is "how fast". If bun executables are always 45x go's that's a problem. If they are always 98mb more than go's, then it's less of a problem as the size grows.
- kaba0 3y agoA car that can transport 7 people is not 3.5x heavier than a car that can only have place for two — the initial size is much bigger, additional js code won’t bloat it further that much.
- keyle 3y agoyeah 90MB for a hello world is big. Approximately 2,700 times bigger than it could be.
- wiz21c 3y agoI got 4Gigs on my phone and 4x that on my laptop. I don't care about 90megs. What's the point in looking at size ? I can see two: - want to email the exe, and you have limits on mail size - want to be ecofriendly, in that case stop watching netflix for 2 hours and you'll have your megs
- microflash 3y agoA native Java "Hello World" can be around 8MB in size.[1] So, yes, 90MB is too much. 1. https://sergiomartinrubio.com/articles/getting-started-with-graalvm-and-java-native/ https://sergiomartinrubio.com/articles/getting-started-with-...
- Waterluvian 3y ago“The generated file is 7.7MB, which is quite impressive for a Java application since this executable does need a JVM.” I assume this is a typo and they mean “does NOT”?
- carbotaniuman 3y agoI think it isn't, and there saying it's impressive how small the JVM overhead is.
- Waterluvian 3y agoIs the JVM inside that 8MB then I guess? That is pretty great. Originally I thought the alternative was “8MB but supply your own virtual machine.”
- squeaky-clean 3y agoThere's no JVM when using GraalVM Native Images, it relies on a JVM during the compile step (well, specifically GraalVM), but produces native code similar to compiling C. There's no virtual machine running bytecode, just entirely native code. So the size of the executable will depend on how many features of the JVM you need compiled into your executable. A pure java bytecode (bring-your-own-JVM) Hello World can be under 2KB pretty easily. Smaller than the equivalent C program. But of course, that's not including the size of your system JVM.
- brabel 3y ago> but produces native code similar to compiling C. That's very misleading. For one, Java running native still needs a Garbage Collector, maintains Object headers which increase memory usage, can do things like reflection for configured classes, can load services via the ServiceLoader, schedule Threads and manage executors, and many other things that are "expected" to any Java application... in summary: native executables still have a Java runtime embedded into them (called Substrate VM, by the way), making them very different from C (much more like Go). Also,notice that native Java executables still tend to have a lower "peak performance" (i.e. once a "normal" JVM has warmed up, it will almost certainly be faster than a native executable because the latter cannot do JIT compilation to take advantage of runtime profiling, like a normal JVM does).
- deleted 3y ago[deleted]
- schara 3y agoI have 13043 .exe files on this computer, at 90MB a piece that would be 1TB.
- sammoore 3y agoIf most executables on your machine used Bun, then it would be a bundled shared library on your system eliminating the bulk of the 90mb executable size. Just like the shared libraries the 13043 .exe files on your computer are currently linking to.
- geysersam 3y agoSure but then we're loosing the simplicity advantage of having only a single executable right?
- ptx 3y agoPython's embeddable package for Windows [1] is 16 MB unpacked. The OpenJDK runtime with the java.base and java.desktop modules is 64 MB. Replacing Swing with SWT (leaving out the java.desktop module) gets it below 50 MB. The full OpenJDK runtime with all modules is around 128 MB. (With Java 17 on Windows.) [1] https://docs.python.org/3/using/windows.html#windows-embeddable https://docs.python.org/3/using/windows.html#windows-embedda...