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

PHP Preloading is coming in 7.4 #1805

Closed
chrisblakley opened this issue Jan 10, 2019 · 4 comments
Closed

PHP Preloading is coming in 7.4 #1805

chrisblakley opened this issue Jan 10, 2019 · 4 comments
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc).
Milestone

Comments

@chrisblakley
Copy link
Owner

chrisblakley commented Jan 10, 2019

In PHP 7.4, we'll be able to preload server-side files to save some compiling time.

https://stitcher.io/blog/new-in-php-74#preloading-rfc

Not sure if we'll have to do anything specifically in Nebula to use this or if it'll just happen, but keep an eye out for it.

@chrisblakley chrisblakley added the Backend (Server) Related to the server-side (includes PHP, HTML, etc). label Jan 10, 2019
@chrisblakley chrisblakley added this to the 7.0 Orion milestone Jan 10, 2019
@chrisblakley
Copy link
Owner Author

@chrisblakley
Copy link
Owner Author

Since this is an emerging PHP features issue, cross-linking #1992 as it does contain some other upcoming PHP 7.4 features.

@chrisblakley
Copy link
Owner Author

chrisblakley commented Apr 11, 2021

This isn't something that Nebula can (or would) bundle, but here is a good starter reference for how to preload WordPress core files with PHP 7.4 opcache preloading: https://gist.github.com/fedek6/4dc1f34ba363659fab75cf72e1d6fbbb

Where to put that file:
Screen Shot 2021-04-11 at 4 15 04 PM

Important to note that you'll need to restart the server every time you want to reload the in-memory files– essentially running something like sudo systemctl restart apache2 or sudo systemctl restart php7.4-fpm.service to refresh cached files.

@chrisblakley
Copy link
Owner Author

Closing this at this point since it is not Nebula-specific. I didn't finish setting it up on my server because there are multiple projects that include non-WP sites and also this being a development server it would require dumping the cache often. I also don't think that Nebula is large enough to make a much bigger dent than opcache alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend (Server) Related to the server-side (includes PHP, HTML, etc).
Projects
None yet
Development

No branches or pull requests

1 participant