Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for winliner-based PGO #217

Open
yoshuawuyts opened this issue Oct 18, 2023 · 1 comment
Open

Add support for winliner-based PGO #217

yoshuawuyts opened this issue Oct 18, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@yoshuawuyts
Copy link
Member

The winliner crate adds support to WASM for Profile Guided Optimization. It would be great if jco was able to provide an integration with winliner 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:

$ jco run <my-component> --instrument # outputs profile.json
$ jco opt --profile=profile.json      # optimize using the generated profile.json 

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!

@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 18, 2023
@guybedford
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants