What do you need to do to improve the performance (speedy execution) for the script you have written?

Questions by Lokesh M   answers by Lokesh M

Showing Answers 1 - 8 of 8 Answers

honey

  • Oct 10th, 2006
 

If your script is to retrieve data from Database, you should use "Limit" syntax.

otherwise...

vinit sharma

  • Oct 26th, 2006
 

There are two approaches :1) Use the templates like SMARTY or Cache_lite FOR templates building.2) Break down the section of website which need not be repeated overa period of time say only to be updated in 2-3 days [For example Header , menu . footer , anouncement etc ], Create a html page for these sections using the php logic , that was used to create the page section in runtime , This can be automated using cron also . the rest of the section which has to be very dynamic will take less time to be build now ,

A.P.Palaniraja

  • Oct 10th, 2007
 

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.

abc

  • Sep 12th, 2011
 

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions