4 ms·
This comparison is still absurd (and incredibly naive). If you have a few hundred requests per day, sure a PHP server is far more efficient use of your box. F
by stickfigure 15y ago
This comparison is still absurd (and incredibly naive). If you have a few hundred requests per day, sure a PHP server is far more efficient use of your box. For that matter, if you have zero requests per day, it's more efficient to just power it off.
At any kind of scale, PHP's model of "start the interpreter, load the code, start executing" is abysmal. To make efficient use of CPU resources you need compiled code - JIT or otherwise. You often need to make use of instance RAM and pooled database connections. Long-running processes are vastly more efficient when running flat-out.
There is a reason Facebook invented hiphop.
- mappu 15y agostart the interpreter, load the code, start executing For pedantry's sake, there is of course FastCGI and/or mod_php to keep the interpreter alive, and APC to keep the code around. Hiphop is of course much faster.
- stickfigure 15y agoIf you have the interpreter live and the code loaded, you're circumventing the parent's "point" that GAE is inefficient because it keeps your application running in a process vis-a-vis the standard way appservers work in java, python, ruby, node, etc.
- IgorPartola 15y agoThe difference is that PHP's interpreter is stateless, while a Django app server is not.