8 ms·
I mean, there are tradeoffs with both approaches. It seems to me that Node’s stateful approach is used by other web servers and languages too. The main tradeof
by anon7000 2y ago
I mean, there are tradeoffs with both approaches. It seems to me that Node’s stateful approach is used by other web servers and languages too.
The main tradeoff is you’re now reloading the entire server for every request in PHP. If you have a massive server or framework, that might not be the fastest thing in the world.
- rob-olmos 2y agoSince php 7.4 there's been opcache preload to keep a lot of the framework instantiated, in php 8.1 opcache inheritance cache covered some ground with preload. Some frameworks like symfony considered removing preload support but they were still seeing benchmarks of 10% better performance with it so it was kept. The biggest pain point with preload IMO is it's global, not per pool, and php-fpm needs to be restarted to update the preload script.