4 ms·
I wonder if the 10-20% reduction in jar size[1] in current Scala 2.12 milestone will carry over to Scala.js? Or maybe Google Closure Compiler is already strippi
by virtualwhys 11y ago
I wonder if the 10-20% reduction in jar size[1] in current Scala 2.12 milestone will carry over to Scala.js? Or maybe Google Closure Compiler is already stripping out loads of anonymous classes in pre-2.12 Scala.js via aggressive DCE.
Would obviously be nice to get generated js blob as lean as possible since Scala 2.13 and overhauled/streamlined collections is still a ways off (at least 18 months post-2.12 GA if release schedule holds).
[1] https://github.com/scala/scala/pull/5003#issuecomment-198150391 https://github.com/scala/scala/pull/5003#issuecomment-198150...
- kodablah 11y agoI would guess unlikely. The reduction in JAR size as mentioned there is due to relying on Java 8 now which gives more JVM-native approaches to things Scala was otherwise emulating (e.g. multiple inheritance). Scala.JS works off of an IR and is not related to native JVM constructs or JVM bytecode.
- sjrd 11y agoUnlikely, because Scala.js already has the reductions that are brought on the JVM only in 2.12. Scala.js has been emitting tiny wrappers around JS closures for more than 2 years. (and no, that's not because of Closure; it's because of our own compiler and optimizer) The overhaul of collections is, in part, supposed to be more friendly to Scala.js and in particular code size of small applications.