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

[FEATURE] Ship Binaries with Profile-Guided Optimization #5691

Open
dwisiswant0 opened this issue Oct 4, 2024 · 0 comments
Open

[FEATURE] Ship Binaries with Profile-Guided Optimization #5691

dwisiswant0 opened this issue Oct 4, 2024 · 0 comments
Assignees
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@dwisiswant0
Copy link
Member

dwisiswant0 commented Oct 4, 2024

Describe your feature request

It would be great if the binaries were shipped with Profile-guided Optimization (PGO) enabled. PGO uses real usage data to optimize the code, making the binaries faster and more efficient, leading to noticeable performance improvements.

Describe the use case of the feature

By using profiling data from the profile-mem flag to generate a PGO file, we can potentially improve performance. This approach allows us to fine tune the engine based on actual memory usage, optimizing it for better efficiency during runtime.

Implementation details:

On push event:

  1. Generate heap profile with profile-mem flag.
  2. Create default.pgo PGO file from memory profile.
  3. Push PGO file to pgo branch (dedicated).
  4. Update the build command in .goreleaser.yml.

Describe alternatives you've considered

Instead of pushing the PGO file to the repo (3), an alternative could be storing the file as an artifact (actions/upload-artifact).

Additional context

https://go.dev/doc/pgo

Ex:

@dwisiswant0 dwisiswant0 added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 4, 2024
@dwisiswant0 dwisiswant0 self-assigned this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

1 participant