Skip to content

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

@dwisiswant0

Description

@dwisiswant0

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:

Metadata

Metadata

Assignees

Labels

Type: EnhancementMost issues will probably ask for additions or changes.Type: OptimizationIncreasing the performance/optimization. Not an issue, just something to consider.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions