472,954 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

Script acceleration with ZEND/Truck MMCache

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
4 3041
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Antoine Bajolet | last post by:
Hello, I have a trouble with apache 2.0.48, php 4.3.4, mmcache 2.4.6 and dbg 2.11.23 In apache error log, i got : caught SIGTERM, shutting down PHP Fatal error: Turck MMCache 2.4.6 can...
24
by: Yang Li Ke | last post by:
Hi guys! Anyone know a way so that users purchasing my scripts would not be able to share them with other people ? Yang
1
by: Alex | last post by:
Hi I need to use turck-mmcache on my site. I need answer. My page need to have 10 milion view per day, Is this possible with turck-mmcache to work without any system going down ? Will turck be...
2
by: Marc de Winter | last post by:
Hello all, I'm new to this newsgroup and have tried to search through the archives first, before posting this question. I don't think it has been addressed before. Also, this question is about a...
1
by: siliconmike | last post by:
Is there a way to encrypt my scripts on the server - then load some decryptor module in Apache to real-time decrypt it in memory..? Is there such a method/module ? (I'm using PHP) ...
4
by: lawrence k | last post by:
There is a point in rendering a page of mine where my script pauses for a long time. It is a painful wait - maybe 5 seconds. It is long enough that when I try to show the software to people they...
1
by: Ju Hui | last post by:
Hi All: I am using mmcache on php 4 for a long time. It's cool software. But as you know, it doesn't support php5 well. I have tested eaccelerator on my box. It isn't good as I mmcache, my web...
1
by: Dan | last post by:
The version of Turck MMCache that I have found only works with PHP 4. Has anyone worked on getting it to work for 5.2? Thanks, Dan
2
by: Andy | last post by:
Would this be the script that checks if you've gone to peoplepc.com ? Something checks the reg for a string. I have tried deleting peoplepc.com in the reg and changing the allowed sites as well,...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.