Reputation: 46
Recently discovered merits in running php scripts via cli, and while the work-flow is faster I've found that executing php scripts via cli is much slower than just refreshing the browser.
echo 'hello'; // >1 second cli vs <10 millisecond in browser
I understand php environment is required to load on every execution call (via php -f), whereas in the browser, php is already loaded into memory via the webserver.
I'm looking for a solution to speed php startup time. Apache is running.
The goal is to speed up the output via a text editors output, which by default runs php -f.
I'm hoping there is a way to either I pre-load php or pipe into apache directly maybe by using the fast-cgi stream directly, but how?
Upvotes: 1
Views: 1928