Re: PHP performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thiago Pojda wrote:
Guys,
I've been asked to build a performance report for a PHP app. I can't profile
it using automated tools as I don't have full access to the server, only to
the application itself.
It's a PHP4 Object-Oriented app, which uses ADODB as abstraction layer with
a Oracle 8i databse. The system also uses a VB.NET socket server for some
data manipulation.
As for migrating to PHP5 I think it's crucial, but I need facts that it
really runs faster than PHP4. Anyone? :)
Any ideas on what might be the bottleneck?

Hi Thiago,

I think it depends on what the application does. You can't just point out a bottleneck just by saying which parts are used.

You can however put little timing functions here and there to measure which part of an application is taking too long.

Like this:

$s = microtime();

do_some_stuff();
do_some_more_stuff();

$f = microtime();

echo ($f - $s)."\n";

This is very simple benchmarking and you need a lot of these steps to really get some idea where the bottleneck could be. A good start would be nearby query execution and results another would be with file access or remote connections. Also good to investigate are huge loops, huge arrays that are iterated over etc.

Do this step by step so you are sure which part you are investigating. Otherwise you have 10 steps, 10 results and you don't know anymore where to look.

Good luck.

Aschwin Wesselius


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux