Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading

[email protected] (Dmitry Stogov) Wed, 11 Mar 2009 14:42:18 +0300
Newsgroups php.internals,php.apc.dev
Message-ID <[email protected]>

shire wrote:
> 
> Dmitry Stogov wrote:
>> Hi,
>>
>> Personally, I like the patch except for some small possible tweaks, and
>> I believe it can't make any harm with lazy loading disabled.
> 
> Thanks, what are the tweaks you'd like to see so I can try to include them?

I thought about different semantics for defined_function_hook and 
declared_class_hook to just load all "lazy" function/classes into 
regular ZE tables.

It's also possible to pass hash_values into lookup_function_hook and 
lookup_class_hook to don't calculate them twice.

I'll return to you in a day or two (after playing with patch and 
measuring speed difference) to be more concrete.

Thanks. Dmitry.

>> Could you provide some benchmark results?
> 
> I was hoping to solicit some from others on the list, but haven't seen 
> anything yet.  My best example of gains is Facebook, I believe these 
> where around 20-30% decrease in CPU usage on a bare-bones page.
> 
> I did test Joomla and Zend Framework, the gains here aren't much if 
> anything as they seem to be use autoload for most files.  (although I 
> would like to see what lazy method loading can do here).
> 
> I intend to benchmark wordpress as well.  I'll post more benchmarks for 
> the above and this once I make some more tweaks that also might give us 
> better results.  I anticipate that benchmarks are going to vary pretty 
> drastically depending on code structure, size, autoloading, etc.
> 
>> APC patch to play with it and see advantages/disadvantages?
> 
> I've gone ahead and checked in the current code for APC, so you'll have 
> the necessary changes if you checkout CVS HEAD.
> 
> -shire