Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43311 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24458 invoked from network); 11 Mar 2009 18:55:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2009 18:55:28 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:34519] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/33-09289-D1908B94 for ; Wed, 11 Mar 2009 13:55:28 -0500 Received: from dhcp-172-26-94-64.nyc.corp.google.com (unknown [72.14.228.89]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 540EC11FAFB; Wed, 11 Mar 2009 19:55:22 +0100 (CET) Date: Wed, 11 Mar 2009 19:55:20 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <292698741.20090311195520@marcus-boerger.de> To: Lukas Kahwe Smith CC: Dmitry Stogov , shire , PHP Internals List , , Andi Gutmans , Stas Malyshev , Rasmus Lerdorf In-Reply-To: <49B7E291.3050807@lerdorf.com> References: <49A097FE.10205@tekrat.com> <49B6AF73.2050506@tekrat.com> <49B75142.2090808@zend.com> <49B77363.4040000@tekrat.com> <49B7E092.2070004@zend.com> <49B7E291.3050807@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading From: helly@php.net (Marcus Boerger) Hello Lukas, Wednesday, March 11, 2009, 5:10:57 PM, you wrote: > 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. Right, basically the patch adresses what we say at conferences. Autload can do an amazing job but also harm you. The patch on the other hand somehow combines the advantages of both worlds. You can be explicit because you know it better and for that you do not get any punishment from Autoload execution time. And then again, you don't get punished by including too much. Becuase after all the compiler knows it even better. And of course, given that some people gain over 20%, I don't see why we even need to discuss putting this in. Last but not least, Lukas, what happened, to putting APC into core? marcus Best regards, Marcus