scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

TupleMirror inflates bundle size for Scala.JS

Open strelec opened this issue 3 years ago • 0 comments

Compiler version

3.2.0, regression

Description

Because TupleMirror uses runtime.Tuples.fromProduct, Scala.JS brings Tuple1 ... Tupe21 into the source code, and that ends up consuming around 50KB of minified (fullOpt) JavaScript code.

So, at the very least, the Scaladoc is not accurate, as the effect is exactly opposite for Scala.JS.

But as we have seen with Vector (https://github.com/scala-js/scala-js/issues/4699), it appears that the team is adding minor benefits to JVM at the significant expense to Scala.JS.

I think this should be discussed.

strelec avatar Sep 09 '22 19:09 strelec