Open
Description
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.