I thought this could be of interrest to some. I ran xdebug during a single request on the Yii blog demo (apc enabled, MySQL set up as backend) and came up with this:
2933
HTML Purifier is taking the lion’s share, which shouldn’t come as a surprise. But: A lot of time is spent in YiiBase (in particular autoload() and import()). This could mean that it may be very well worth it to always use yiilite.php instead of yii.php.
I reached the same conclusion when I profiled with xdebug and KDE.
I must add that on production it is expected good idea, but during development I find this approach not ideal for me especially when using APC or x-cache
It’s quite interesting: Apart from the loops in YiiBase, there’s really little room for performance improvements. Almost all possible optimizations either belong into the realm of micro optimizations (resulting into illegible, unmaintainable code) or refactoring (introducing almost certainly bc-breaking changes).