Re: Some more plane hacking...
| From: | (Stig Sæther Bakken) | Date: | Fri, 17 Aug 2001 07:05:42 +0000 |
| Subject: | Re: Some more plane hacking... | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1580@lists.php.net to get a copy of this message | ||
["Tomas V.V.Cox" <cox@idecnet.com>]
> Rasmus Lerdorf wrote:
> >
> >
> > What is the overall feeling here about converting some of this stuff to C?
> >
>
> My personal feeling is that is not a good idea. My points:
>
> - The work needed to build a valid C extension in the terms of bug
> haunting, cross platform, PHP/Zend internals knowledge, speed of coding,
> etc is too big.
> - The number of contributors will be reduced draticaly. Don't know
> what's the general C knowledge here, but I know that mines for example
> is not valid for a seriuos work.
> - Moving PHP PEAR classes from one server to another is a trivial work,
> C classes shouldn't.
> - Most of PHP users haven't enought tools and knowledge to compile a
> external C extensions.
> - The only reason I see where a C extension makes sense is the speed,
> but the speed in the most of the php develpments isn't a real worry
> compared to maintainability or speed of development. If you want to
> write a C extension for a class put it in the class package space as
> another nice choice, but don't cut its usability to others.
>
> PHP is nice, simple, easy, cross platform and a very poweful scripting
> language, it is the success of PHP, please don't complicate things.
Execution speed _is_ an important issue, as well as development speed.
To take my day job as an example, alltheweb.com is currently some
12,000 lines of PHP code, and has to deal with almost 150 PHP requests
per second at peak hours. We're not using a template system today
because we don't have the CPU for it. Smarty is fast, but it still
has an initialization overhead that's too expensive for us. If the
initialization and execution parts of Smarty are rewritten to C, it'll
probably be a perfect solution for us.
There are plenty of other sites with traffic of the same order of
magnitude out there. These are high-profile sites, if we want them to
use PEAR we have to consider execution speed too (two years ago people
would maybe just buy more machines, today this economy is different).
- Stig
--
Stig Sæther Bakken <ssb@alltheweb.com>
Fast Search & Transfer ASA, Trondheim, Norway