Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76412 invoked from network); 14 Aug 2008 07:08:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2008 07:08:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:32915] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/3C-05165-2F9D3A84 for ; Thu, 14 Aug 2008 03:08:35 -0400 Received: from [83.228.56.37] (port=2653 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1KTWwh-0007um-Vx for internals@lists.php.net; Thu, 14 Aug 2008 02:08:32 -0500 Message-ID: <1F83E7D6F6F94BE89BA045FE02F89749@pc> To: References: <909776579.20080803142659@marcus-boerger.de> <200808140027.53442.larry@garfieldtech.com> <48A3C45D.10400@lerdorf.com> <200808140137.28106.larry@garfieldtech.com> <48A3D475.7040903@lerdorf.com> Date: Thu, 14 Aug 2008 10:08:23 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: sv_forums@fmethod.com ("Stan Vassilev | FM") >> 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 > 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