PHP Optimization

magnet January 5th, 2008

Hello All,

Last week we had a session on PHP Optimization in Mumbai & later in Ahmedabad.

The session was about various techniques to be followed to ensure your code is optimized, as well as the various other components which contribute in a major fashion to optimizing your scripts. Those components are the database, caching & web server. A small brief was also touched upon Zend engine, Zend optimizer & APC Accelerator.

Here were some of the major highlights from the session:

1. Difference between Optimization & Scalability. A trade-off is involved between the two always
2. Optimization is different from following good programming practices
3. Database is the major bottleneck in most of the cases
4. If you just optimize your PHP code, there are very good chances that the optimization achieved will be negligible. This is because PHP itself is very fast
5. Output buffering saves a lot of time & memory
6. Few Optimization myths i.e. echo vs print, use of comments, references, etc.
7. How Jobby started on PHP & not JAVA after interviewing Digg.com’s Senior Developer

You can find the slides at: http://blog.magnettechnologies.com/uploads/PHP_Optimization.html

Following resources were referred:

http://phplens.com/lens/php-book/optimizing-debugging-php.php
http://www.oreillynet.com/onlamp/blog/2006/04/digg_phps_scalability_and_perf.html
http://www.moskalyuk.com/blog/php-optimization-tips/1272
http://ilia.ws/archives/12-PHP-Optimization-Tricks.html
http://www.dublish.com/articles/10.html
http://www.danga.com/memcached/
http://www.zend.com/en/products/guard/optimizer/

Thank You.

Vishal Kothari

Trackback URI | Comments RSS

Leave a Reply