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

Same file inline optimization #6291

Open
dktapps opened this issue Mar 19, 2024 · 0 comments
Open

Same file inline optimization #6291

dktapps opened this issue Mar 19, 2024 · 0 comments
Labels
Category: Core Related to internal functionality Performance Type: Optimization Improves performance and/or reduces resource usage

Comments

@dktapps
Copy link
Member

dktapps commented Mar 19, 2024

Description

OPcache is able to perform certain inline and static linking optimisations when linking functions within the same script. This can offer performance gains in some cases.

However, this kind of optimisation is not possible when functions are declared in different files. This is because OPcache cannot assume that the same files will be loaded in all requests, so it can't statically link them.

Placing performance-sensitive code inline, or at least within the same .php file, may enable certain kinds of performance optimisations that are otherwise impossible.

I'm not sure where in the current codebase we might benefit from this knowledge. However, it's probably worth investigating.

Justification

Moar performance

Alternative methods

@dktapps dktapps added Category: Core Related to internal functionality Type: Optimization Improves performance and/or reduces resource usage Performance labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Performance Type: Optimization Improves performance and/or reduces resource usage
Projects
None yet
Development

No branches or pull requests

1 participant