Brent 'Dax' Royal-Gordon wrote:
Blaming the language is rarely a productive way to fix such a problem. In particular, Python usually uses the same initialize-and-run model you complain about PHP using, and mod_mono doesn't seem to be widely used. (And I assume Wikimedia has no interest in switching to Windows servers.)
Just a note: I've specifically mentioned standalone daemons as an alternative possibility, *not* CGI programs or ASP.NET.
PHP really is much more strongly tied to the CGI-bin script execution model than say Python, which is fairly routinely used to write network servers and GUI programs.
There's nothing in PHP-the-language that makes a standalone daemon written in PHP _impossible_, but it's rather awkward with PHP-the- implementation's limitations -- no threading, awkward subprocess control, limited exception handling. (Domas has experimented a bit with this.)
(A complaint about PHP-the-language I do have though is its total lack of Unicode string support. The only sensible way to deal with non-ASCII material ends up being using byte-oriented strings in UTF-8 encoding, and you have to worry about character boundaries and invalid character sequences yourself where relevant. Not insurmountable, but it's certainly an annoyance. Python carries the legacy of transitioning from this model, and now has both byte-oriented and Unicode string types; perhaps one day PHP will make the jump too.)
Most reasonably mature languages are fast enough that the performance bottlenecks are usually in user code. And at least one of the PHP problems--lack of a JIT--will be solved when PHP-on-Parrot is available. (There's at least one project to do this; the interpreter itself is already quite fast and has JITs for several platforms, although much of it still has to be written.)
Well, we'll see when it gets there. :)
-- brion vibber (brion @ pobox.com)