[phpa] Re: IMPORTANT comment concerning Vhost phpa enable

  • From: "Paul Dixon" <paul@xxxxxxxxxx>
  • To: <phpa@xxxxxxxxxxxxx>
  • Date: Tue, 29 Jan 2002 17:08:39 -0000

> Just curious now, is there anything more I can do with this to get a bit
> more speed out of the system?  I'm amazed at what I'm getting so
> far but I might as well get as much as I can :)

We've been busy optimizing a large site recently. Here's what we found
useful:

For a given page analyse every single DB query and ask yourself if can be
optimised, e.g.

- through addition of table indices to speed up joins
- removal of complex joins, perhaps by creating a secondary table of cached
results
- I've come across cases where programmers have an outer loop enumerating
query results, with additional lookup queries inside the loop. In most
cases, an efficient 'one shot' query exists that provides all the values
required in each loop iteration, without the need for further lookups.

If you are dynamically generating page elements that don't change much, you
can cache those too using output buffering. If your cached file is new
enough, output that, otherwise regenerate it and capture it with output
buffering (ob_start etc). This is only a win if the regeneration time far
exceeds the time taken to fetch the cached data.



Hope that helps!

Paul Dixon
Elphin Ltd

------------------------------------------------------------------------
  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: