Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading
| From: | Rasmus Lerdorf | Date: | Wed, 11 Mar 2009 16:10:57 +0000 |
| Subject: | Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals php.apc.dev |
| Request: | Send a blank email to internals+get-43307@lists.php.net to get a copy of this message | ||
Dmitry Stogov wrote:
> Hi Shire,
>
> I run patched APC on a number of real-life applications and got more
> than 30% speedup on XOOPS (99 req/sec instead of 60%) and 20% on
> ZendFramework (41 req/sec instead of 32), however most applications
> (drupal, qdig, typo3, wordpress) didn't show significant speed
> difference. As was expected the patch doesn't affects PHP without APC or
> with APC and lazy loading disabled.
>
> I also got APC warning with Zend Framewoek based blog application, but I
> didn't try to look deeper.
>
> [Wed Mar 11 17:53:02 2009] [apc-warning] [Wed Mar 11 17:53:02 2009]
> [apc-warning] apc_lookup_class_hook: could not install blogrow in
> /var/www/html/bench/fw/ZendFramework-1.5.0RC3/library/Zend/Loader.php on
> line 86
>
> I didn't look careful into APC code, just into PHP patch and I see the
> following issues:
>
> 1) I would prefer to add additional hash_value argument into
> lookup_function_hook() and lookup_class_hook to prevent multiple
> calculation.
>
> 2) function_exists() should use lookup_function_hook().
>
> 3) interface_exists() and class_alias() should use lookup_class_hook().
>
> 4) ext/soap, ext/reflection, ext/wddx and ext/spl autoload support
>
> Anyway, it's very good job and 20-30% speedup on some real-life
> applications makes sense to include it into 5.3 (from my point of view).
Makes sense to me as well, especially since I don't see any drawbacks
for non-accelerated scripts.
I also think some of those applications that didn't show any gains could
be trivially modified to make use of it. Moving from conditionally
loaded stuff to lazy-loaded is likely to speed things up. Depending of
course on how granular the conditional loading is.
-Rasmus