4 ms·
I'm curious to know the size of a scala.js hello world program.
by mercurial 12y ago
I'm curious to know the size of a scala.js hello world program.
- sjrd 12y agoHello worlds are about 100 KB not gzipped, but this is not a good measurement. As your application grows, this doesn't grow as fast. Scala.js is meant for medium to large size applications anyway.
- ArturSoler 12y agoSimple Scala.js JS "binaries" are quite big (from ~170kb before compression) because they add the part of the Scala standard library that they need. From there, though, output size does not increase fast.
- jducoeur 12y agoAs mentioned upthread, hello world isn't really representative. A more useful metric is probably what I'm doing -- a large, complex single-page business app with lots of specialized gadgetry. Including the standard Scala.js prelude (100-200k), that currently clocks in at a bit under a megabyte. That's quite reasonable for a program of its complexity, and loads pretty fast. And once that is loaded and in the browser cache, the UI is lightning fast afterwards...
- Cyph0n 12y agoThanks for the perspective. It seems like a viable option for the frontend of my planned product, which I hope to write in Scala + Play.
- smandou 12y agoTraceur (ES6 compiler) itself has a runtime of several hundreds kb. Nothing you can't avoid at some point. There is an overhead for sure. But in most cases, execution time is spent in native calls (Dom rendering especially).
- EugeneOZ 12y ago6to5 compiler don't have this disadvantage.
- samspot 12y agoMine is 20kb after google closure optimization. 139kb unminified.