| |
GeekInterview.com > Interview Questions > Programming > PHP
| Print | |
Question: What do you need to do to improve the performance (speedy execution) for the script you have written?
|
| October 10, 2007 05:33:44 |
#3 |
| A.P.Palaniraja |
Member Since: Visitor Total Comments: N/A |
RE: What do you need to do to improve the performance ... |
There are many things to be considered. If your application based on Database, you should think about re-factoring queries try to use high performance queries (Use EXPLAIN to monitor the amount of records retrieved for each query. You can use UNIQUE, LIMIT, WHERE to filter the no of records returned).And also you should be aware of fine tuning configuration for your needs. In PHP you should use native functions instead of aliases. And also you should choose best function for the job. If you are going to do simple string replace use str_replace than ereg_replace. Use is_int() instead of is_integer().Use DBG or xdebug to profile your scripts, find the bottle neck function and try to re factor if possible. |
| |
Back To Question | |