Open yoshuawuyts opened 1 year ago
This is a really interesting idea! The benefits of it being JS-ecosystem-focused being that JS developers or build tools don't need to separately install or depend on native tools and that we can more directly link the profiling collection to the profiling optimization.
Could definitely be worth investigating after the preview2 freeze.
The
winliner
crate adds support to WASM for Profile Guided Optimization. It would be great ifjco
was able to provide an integration withwinliner
to compile with PGO enabled, run the profiler, and then rebuild using the captured profile. I believe we're already providing some optimizations for size and speed via binaryen. And I believe this should be mostly in line with that.The reason why I'm suggesting we include it here, rather than say
componentize-js
, is because I believe this would work best if the following lines was possible:This is not a priority, but I saw
winliner
come by yesterday, and PGO-based optimization seemed like it would be worth eventually including. Thanks!