[phpa] Re: Zend Optimizer

  • From: Nick Lindridge <nick@xxxxxxxxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Thu, 4 Oct 2001 08:51:44 +0100

Hi Daniele,

On Thu, Oct 04, 2001 at 01:37:10AM +0200, Daniele Gubert wrote:
> Hi, just a couple of days after I happily installed PHP Accelerator 
> v1.0p6, the long-awaited new version of a commercial links script I'm 
> using [In-link 2.1] has come out, requiring the Zend Optimiser 
> [because some files have been encoded, I suppose].

Thanks for trying phpa. This situation is a real shame
as you'll have to use their optimiser in this case. As you read, 
unfortunately 3rd party extenions and the Zend Optimiser can't
coexist easily, and the optimiser goes to some lengths to ensure
that they don't - which is reasonable as they want to protect 
people from getting at the code they're protecting.  There will
be ways around this, but I haven't explored this and don't intend

> What shall I do?  Can the Accelerator behave as a Zend Optimiser 
> substitute or do the two incompatible programs perform very different 
> tasks?

Essentially they do different tasks, although the current development
version of PHPA also has a code optimiser built in. The caches are
eliminating the reading and processing of source files, and also many
other operations that are normally done before a script can execute.
So you're still governed by the time your script physically takes to
execute, but for many scripts this isn't long, and the parsing etc.
can be a significant proportion of the total time.  But the real 
point is that you do need ZO to run your encoded files.

Releasing an encoder that would work with the Accelerator and
give the same protection would be straightforward, and perhaps your
vendor could be persuaded to then give you a version that would
work with PHPA encoded files, once convinced that his intellectual
property would be adequately protected. But again this isn't 
something that I have time to look into at the moment unfortunately.

> How much of a performance gain can be obtained thru the Zend 
> Optimiser [not Zend Cache] as compared to PHP Accelerator?

I believe that someone quoted a 40% gain with the optimiser. It 
depends how your scripts are written and what they do, and
you may get more or less than that.  It's not uncommon for 
scripts to go slower with the optimiser because you have to add
on the time taken to do the optimisations. To be most effective you
need to combine an optimiser with a cache so that overhead of
optimisation is a one-off hit.

PHPA tends to have very similar performance to ZC, and both are
likely to give you a two to three time speed increase
for 'typical' web pages that generate web output and 
perhaps run quick DB queries, and that don't do heavy computation.

Sorry I can't help with your encoded files.

Best regards

  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe

Other related posts: