Skip to content

[dart2wasm] Better infrastructure/tooling to debug where binary size is coming from #60929

Open
@mkustermann

Description

@mkustermann

Currently we have very little insight on where code size for dart2wasm compiled apps are coming from, why something wasn't tree shaken etc.

The VM's AOT compiler has for example --trace-precompiler-to that allows dumping information on why certain functions/fields/... were not tree shaken. The resulting information is dumped into a json that can be analyzed.

It would be nice to have tooling one can use to query: How much size comes from async functions, size per dart function/class/file/package ...

What makes this more complicated is that the actual size is only relevant after binaryen has run - our unoptimizing dart2wasm compiler may emit lots of code that's shranken by binaryen.

Metadata

Metadata

Assignees

Labels

area-dart2wasmIssues for the dart2wasm compiler.type-performanceIssue relates to performance or code size

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions