Skip to content

TupleMirror inflates bundle size for Scala.JS #16013

@strelec

Description

@strelec

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 (scala-js/scala-js#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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions