Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39955 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83415 invoked from network); 14 Aug 2008 08:01:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2008 08:01:23 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 76.96.62.17 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 76.96.62.17 qmta10.westchester.pa.mail.comcast.net Received: from [76.96.62.17] ([76.96.62.17:44853] helo=QMTA10.westchester.pa.mail.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/4D-05165-256E3A84 for ; Thu, 14 Aug 2008 04:01:23 -0400 Received: from OMTA11.westchester.pa.mail.comcast.net ([76.96.62.36]) by QMTA10.westchester.pa.mail.comcast.net with comcast id 27yf1a00N0mv7h05A81LD2; Thu, 14 Aug 2008 08:01:20 +0000 Received: from earth.ufp ([24.13.255.226]) by OMTA11.westchester.pa.mail.comcast.net with comcast id 281L1a0064trKQ83X81LUP; Thu, 14 Aug 2008 08:01:20 +0000 X-Authority-Analysis: v=1.0 c=1 a=n-O3kHwuCEAA:10 a=3hJunRM-uZJ2bHNR4BgA:9 a=vsrMHZWDGQw10yCul3SoBLwktLkA:4 a=FHBbIDN7CdwA:10 a=LY0hPdMaydYA:10 Received: from localhost (localhost [127.0.0.1]) by earth.ufp (Postfix) with ESMTP id 515D4D7A04 for ; Thu, 14 Aug 2008 03:01:20 -0500 (CDT) Received: from earth.ufp ([127.0.0.1]) by localhost (earth.ufp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YY5b3WfREDnx for ; Thu, 14 Aug 2008 03:01:20 -0500 (CDT) Received: from luna (unknown [192.168.42.7]) by earth.ufp (Postfix) with ESMTPSA id 36594D79D3 for ; Thu, 14 Aug 2008 03:01:20 -0500 (CDT) To: internals@lists.php.net Date: Thu, 14 Aug 2008 03:01:20 -0500 User-Agent: KMail/1.9.9 References: <909776579.20080803142659@marcus-boerger.de> <48A3D475.7040903@lerdorf.com> <1F83E7D6F6F94BE89BA045FE02F89749@pc> In-Reply-To: <1F83E7D6F6F94BE89BA045FE02F89749@pc> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200808140301.20278.larry@garfieldtech.com> Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: larry@garfieldtech.com (Larry Garfield) On Thursday 14 August 2008 2:08:23 am Stan Vassilev | FM wrote: > >> For better or worse 99% of the code I write runs on systems without an > >> opcode > >> cache 99% of the time so that's what I optimize for. That it is > >> apparently > >> impossible to optimize for both opcode caching and non-opcode caching > >> environments at the same time (the former hates conditional include, the > >> latter loves it) is a problem in itself, although I will be honest that > >> I have never fully understood the reasons for it. (Doesn't the opcode > >> cache > >> just recognize "oh yeah, file /foo/bar/baz.php, I've got that parsed > >> already > >> I'll just add that to the runtime environment"?) > > > > No, it also takes all top-level functions and classes and caches the > > created functions and classes in shared memory and modifies the cached > > opcodes to not need to create these at execution time. However, it > > obviously can't do this if the execution context is required in order to > > know whether the function or class should exist on that request, so > > whenever you do any sort of conditional function or class definition you > > lose this level of caching. > > > > -Rasmus Hm, I see. So you still get the cached compiled opcodes, but not the cached "linking". (To use C++ terminology, which I'm sure is technically inaccurate in this case.) Thanks. > Hi, > > This is why it pays to have two automated distribution models. For > deployment with no opcode cache, and for development/version control, an > autoloader using a class map is most practical. > > An automated packer can take all classes and functions (or part of them in > common use) and put them in the bootstrap file for opcode deployment, > leaving only the less common to autoload. > > (And which makes the fact we can now have multiple namespaces in one file > really important) > > Regards, > Stan Vassilev Not looking to start a flame war, really, but how do the above opcode concerns impact Phar? (I mention that here because it was discussed as a potential alternative to multiple namespaces per file to avoid the many-stats problem.) -- Larry Garfield larry@garfieldtech.com