By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

Script acceleration with ZEND/Truck MMCache

P: n/a
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the same
as if I would make several queries with different conditions on same data in
DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have low
number of users requesting very demanding content.

Thx for any advice.

Munja


Jul 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Actually, no. Those do opcode caching, which is basically the part where
the Zend Engine reads the php file and transform it into
machine-readable code. Those accelerators will not speed up your queries
at all. If you want to speed up queries, you might want to upgrade to
MySQL4 to benefit from the query caching.

Munja wrote:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the same
as if I would make several queries with different conditions on same data in
DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have low
number of users requesting very demanding content.

Thx for any advice.

Munja


Jul 16 '05 #2

P: n/a
Munja:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the
same as if I would make several queries with different conditions on same
data in DB.

Calculating data in PHP instead of running several queries (each query has
joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation
performance and shorten page generation time? As far as I could see, main
purpose of these accelerators is to decrease server load while high number
of users is requesting more or less simple content and in my case I have
low number of users requesting very demanding content.


The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.
Jul 16 '05 #3

P: n/a
"André Nęss" <an*********************@ifi.uio.no> wrote in message
news:bf*********@maud.ifi.uio.no...
Munja:
I have PHP script running complex query and then calculating data for
different conditions from received result set. Actually, it's doing the
same as if I would make several queries with different conditions on same data in DB.

Calculating data in PHP instead of running several queries (each query has joins on several tables with several hundreds of thousands of records)
shortened page generation time, but it's still not fast enough :-(

Now, I'm wondering if using some PHP accelerator/optimizer like Zend
Optimizer or Truck MM Cache would help me increase PHP script calculation performance and shorten page generation time? As far as I could see, main purpose of these accelerators is to decrease server load while high number of users is requesting more or less simple content and in my case I have
low number of users requesting very demanding content.


The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.


I supose this is where I can maybe make some improvement. Do you know if
there is some PHP performance mesuring tool on the market (something
simillar to Borland Optimizeit for Java)?
Also, how complicated is to make parts of scripts in C? Does it requiere
dramatical Apache/PHP reconfiguration or it can be solved on more or less
simple INCLUDE and CALL from PHP ?
Jul 16 '05 #4

P: n/a
Munja:
The first thing you should do is profile your code and find out where the
bottleneck is. Based on that you can try to optimize the script, or maybe
even rewrite critical parts of it in C.
I supose this is where I can maybe make some improvement. Do you know if
there is some PHP performance mesuring tool on the market (something
simillar to Borland Optimizeit for Java)?


There was a thread here very recently about that, but I didn't read it...
Try searching google groups for "php profiler/profiling". It's really
unfortunate that PHP doesn't come with a profiler :/
Also, how complicated is to make parts of scripts in C? Does it requiere
dramatical Apache/PHP reconfiguration or it can be solved on more or less
simple INCLUDE and CALL from PHP ?


If you can isolate the bottleneck and turn it into a function written in C
it shouldn't be too hard. That way you could keep the rest of the script as
it is. I guess you should start here: http://www.php.net/manual/en/zend.php

A search also turned up this: http://www.devnewz.com/2002/0909.html

And I'm sure there are plenty more resources out there.

André Nęss
Jul 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.