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 #13

Closed
Nyholm opened this issue Apr 11, 2020 · 4 comments
Closed

PHP preloading #13

Nyholm opened this issue Apr 11, 2020 · 4 comments

Comments

@Nyholm
Copy link
Collaborator

Nyholm commented Apr 11, 2020

If I create a preloading script, then some classes in the cache directory will be preloaded, right?

If we move those classes, they will not be preloaded.
If we symlink them, then we have to do a filsystem lookup, and then we find a preloaded class.

The filesystem lookup will be cached with the default PHP.ini.

But does this mean we should symlink as much as possible?

@Nemo64
Copy link
Contributor

Nemo64 commented Apr 11, 2020

The preload file normally does not include cache files, just service classes and the generated container, which must be symlinked because it contains require statements.

@Nemo64
Copy link
Contributor

Nemo64 commented Apr 11, 2020

Besides, do you use that feature? I tried it once with bref and it wasn't so great and consistently decreased performance for small requests.

@Nyholm
Copy link
Collaborator Author

Nyholm commented Apr 11, 2020

Yes, I've tried. You just have to be smart about it. https://developer.happyr.com/php-74-preload

Symfony 5.1 is bringing some really cool improvements here.

The preload file normally does not include cache files

I opened this issue to make sure we dont shoot ourselves in the foot. =)

@Nyholm
Copy link
Collaborator Author

Nyholm commented Apr 12, 2020

Preloading works before the first request comes in. So the bridge will never stop the preloading script from working.

It could potentially damage something, bu tas @Nemo64 says, the preloader script does not preload things in the cache directory.

Also see #18

@Nyholm Nyholm closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants