RE: [PHP] Performance Hints?
| From: | Sander Pilon | Date: | Wed, 26 Jul 2000 10:05:51 +0000 |
| Subject: | RE: [PHP] Performance Hints? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8249@lists.php.net to get a copy of this message | ||
As others said...
32K lines is just too much for compile-and-execute-once (webscripts).
If possible, reduce the amount of lines by using conditional includes, as
pointed out before.
We have a project with 25K lines of perl, but the big difference is that we
keep the entire thing in memory. (It listens on a socket, and we connect to
it.)
What you are hitting here, with 32K lines of webscript, is not so much a PHP
limitation, but more of a limitation of the whole concept. Anyone who thinks
that you can realisticly expect to load, compile, execute and finish 32K
lines of PHP/Perl/ASP/Python/whatever scripted language instantly should
take their CS classes again :)
But, the 'Zend Repository' or something like that might help you, when it is
released. It's supposed to be some kind of in-ram-storage for *compiled*
php4 scripts, so that they can execute allmost instantly. (Skip the load &
compile steps) It might be worth waiting for that.
I'm a bit rusty on the details, so be sure to check with your local Zend.com
representative or http://www.zend.com
-Sander
> -----Original Message-----
> From: Michael Kimsal [mailto:michael@note.themusicguide.com]
> Sent: 1 January 1601 01:00
> To: John Brayton
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Performance Hints?
>
> *SNIP*
>
> I can't imagine 32,000 lines of code running optimally in ASP, PHP,
> ColdFusion or Perl.
>
> In short, I don't think your problem lies with choosing PHP so much as
> trying to fit too much into it.
>
> >
> > I'm finding that a *huge* bottleneck is just parsing the PHP code,
> > before it even gets executed. I have a test page that includes
> > several files, and many of the included files include other files.
> > In total, I have 46 files being included in a page with a total of
> > 32,000 lines of code. Just including these files (before even
> > executing the code) is taking at least .5 seconds. Note that this
> > time does not include the execution of any code, it's just including
> > class definitions, etc., to be used later in the page.
> >
> > We have been using PHP 3, but are just now starting to experiment
> > with PHP 4 in hopes that it will help. But there is no noticable
> > difference thus far. Any hints??? Am I insane for having such a
> > large project in PHP?
> >
> > Any advice would be welcome.
> >
> > Thanks!!!
> >
> > John
> >