Skip to content

Add pgo (Go only) generator #2360

@henderkes

Description

@henderkes

Describe your feature request

Is your feature request related to a problem? Please describe.
We currently release frankenphp without pgo. For libphp this makes sense and is very hard to get sensible profiling data for, for frankenphp however the complete surface is much, much smaller and go tends not to produce worse-for-general-use binaries for cold paths

Describe the solution you'd like
Caddy lets us get pprof profiles very easily through the admin api, so all we really need are some php scripts to call into all the various frankenphp paths (read cookies, read post data, send buffered responses, etc) in regular and in worker mode (two different hot paths), merge the two together and rebuild with go build -pgo=/path/to/profile.pgo.

Optimally we'd make this for all operating systems, but realistically we don't really have OS-dependent stuff in the hot paths outside of auto scaling. So I'm thinking for a start, just generate the pgo data automatically with a script and push it into some folder that can then be reused by everyones compilations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions