JMK no matter what

PHP Optimization Practices

Slides link: many practices also can be applied to other environments as well.

Summary:

  1. Premature optimization is root of all evil (ahem)
  2. Avoid common misunderstandings: a. More code does not necessarily mean slower performance.
  3. We can always throw more hardware at it
  4. Optimize, but don't touch the code: it's better to start from optimizing portions that can be changed without harming code integrity. a. Example: memoizing expensive function calls or SQL queries with memcache
  5. Use opcode caches (PHP specific)
  6. Optimize database before code.
  7. Always profile before optimizing.
  8. Pay attention to output control.
  9. Compile your binaries: Frequently you can see 15~20% speedups.

I should say that the last one was rather unexpected; so that's why people use Gentoo, hmm.

2009-06-28 01:11:08 | JM | /quickpost/readinglist/ | 4 Comments
dasony
2009-06-28 12:00:57
* Stop using PHP.
Being
2009-06-28 13:35:48
젠투는 우월합니다
ltdtl
2009-06-29 12:33:22
stop using php에 한표
JM
2009-07-01 21:54:53
But even Facebook keeps uses PHP...

Leave a comment