-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Enable opcache by default #160
Comments
Just need to keep in mind that if we enabled a shared extension at the Layer, it can not be disabled by the developer in their project. It would require another layer to disable. Not that I can think of why anyone would want to disable opcache. |
Maybe if Lambda memory hits the limit. But it depends on running application e.g. full stack framework vs. simple cron worker. What for default Have we experience/benchmarks how opcache works with Lambda? If the Lambda is warm, is opcache shared between requests? |
Good questions. I have no experience with it (in lambda) myself, and now that you ask the question, it does seem to present some challenges. Especially given that the cache is in shared memory, we would need to do some testing to ensure that the cache persists from one request to the next. If we are caching, and then not actually using the cache, it would just be overhead. Default It appears that testing is in order. |
Opcache on lambda was introduced in #14, I did some testing with API Platform (on Symfony 4). Here is the optimized In Bref 0.2 PHP was only really usable with 1Gb Lambdas and up so this is why I didn't care that much about the numbers. But maybe we could tone down the memory limit. Also I've updated those configs in #155 to differentiate between a FPM-optimized config and a CLI one. |
About the initial question, I see no reason to disable opcache in the common use cases. |
Alright, using opcache filecache is the key. 👍 |
Opcache is enabled, this is tested and now documented (in #206). 🎉 |
Let's enable opcache by default as it brings performance improvements at no cost.
The text was updated successfully, but these errors were encountered: