970_90

Thursday, 29 May 2014

Free Boost Web Application By 20% in Simple Steps

Simple Steps to Boost your appliction by 05 - 20%

  • echo is faster than print and use echo's for multiple parameters
  • Unset your large variables to free memory
  • use swtich case instead of if-else
  • Don't use @ because Error suppression with @ is very slow.
  • Turn on apache mod_deflate, mod_gzip which is available as an Apache module, compresses your data on the fly. It will boost your appliction and can reduce the data to transfer up to 80%
  • Incrementing/Decrementing a global variable is 2 times slower than a local variable
  • Incrementing/Decrementing an undefined local variable is 8 times slower than a initialized one.
  • use require instead of require_once
  • comment un-necessary code and remove the commented code
  • Avoid count(*) on entire tables, it can lock the entire table.
  • Use GROUP BY instead of DISTINCT when appropriate.
  • Use INSERT ON DUPLICATE KEY or INSERT IGNORE instead of UPDATE to avoid the SELECT prior to update.
  • Use Static Method, Speed improvement is by a factor of 4
  • Avoid necessary loops, because it may slow your application.

No comments:

Post a Comment