PHP Performance Optimization
In every development cycle there comes the time, when you've got to optimize things. I really love the following article: guys & iris: you should all have a good read of http://c2.com/cgi/wiki?PrematureOptimization about this topic.
It clearly explains and lays out why it is the best to:
As you might be well aware, a typical combination to identify PHP bottlenecks is XDebug to log execution times and KCacheGrind to make them human-readable. Unfortunately, the installation process of KCacheGrind of Mac OS X is not that straight forward, although it's pretty straightforward :).
I've taken the following small tutorial from http://brent.izolo.com/blog/?p=4 and amended it where necessary.
Bests,
Charly
It clearly explains and lays out why it is the best to:
- Make it work.
- Make it right.
- Make it fast.
- Make it work.
- Make it right
- Make everything work.
- Make everything right.
- Use the system and find performance bottlenecks.
- Use a profiler in those bottlenecks to determine what needs to be optimized.
- Make it fast. You maintained unit tests, right? Then you can refactor the code mercilessly in order to improve the performance.
As you might be well aware, a typical combination to identify PHP bottlenecks is XDebug to log execution times and KCacheGrind to make them human-readable. Unfortunately, the installation process of KCacheGrind of Mac OS X is not that straight forward, although it's pretty straightforward :).
I've taken the following small tutorial from http://brent.izolo.com/blog/?p=4 and amended it where necessary.
- Install Fink. An excellent article on how to set up Fink on your Mac can be found in the O'Reilly macdevcenter. Check it out. Otherwise, you can just download the installable binaries for your version of Mac OS from the Fink homepage.
- install the X11 development package as hinted by this incredibly useful little tutorial:
Installing X11 on OS X 10.4 Tiger. It's 5 years old, but still up to date. - edit /sw/etc/fink.conf and add:
unstable/main unstable/crypto
to the Trees key. The line should now read like this:
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto - Open the command-line and enter:
fink selfupdate; fink index; fink scanpackages - After the update and reindexing finished enter:
sudo fink install kcachegrind
in the command line - Answer all the questions by the script and prepare for a looooooooooong configuration and installation time (many, many package dependencies)
- start X11 (e.g. by using the Spotlight and searching for "X11")
- open the console and type:
/sw/bin/kcachegrind
Bests,
Charly
Labels: API, general help, library, programming
<< Home