Description
Description
Idea:
Support hibernating the JIT cache to disk.
Why?:
When building containers that contain both the PHP runtime and application code (that isn’t going to change once built into the container), a lot of CPU cycles are wasted re-warming the opcache/JIT every time a version of the container starts, even though the code will always remain the same.
In a large distributed container based platform like Lambda, App Runner, App Engine or Cloud Run, there are significant performance gains & cost savings to be realised by being able to pre-warm the JIT at container build time, then load it from disk at container startup.
How?:
Would it be possible to dump the JIT/opcache memory to disk?
While also having the option to load that dump at startup?
It could be controlled via ini options, which could be set on the PHP CLI as arguments when dumping the memory at build time.