Re: PHP performance
| From: | Aschwin Wesselius | Date: | Mon, 03 Mar 2008 20:39:45 +0000 |
| Subject: | Re: PHP performance | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270876@lists.php.net to get a copy of this message | ||
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