Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39958 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 132 invoked from network); 14 Aug 2008 10:04:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2008 10:04:36 -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:57550] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/00-05165-33304A84 for ; Thu, 14 Aug 2008 06:04:36 -0400 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 11DA011F38E; Thu, 14 Aug 2008 12:04:33 +0200 (CEST) Date: Thu, 14 Aug 2008 12:04:29 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <486246746.20080814120429@marcus-boerger.de> To: Rasmus Lerdorf CC: Larry Garfield , internals@lists.php.net In-Reply-To: <48A3C45D.10400@lerdorf.com> References: <909776579.20080803142659@marcus-boerger.de> <48A36617.5010803@lerdorf.com> <200808140027.53442.larry@garfieldtech.com> <48A3C45D.10400@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: helly@php.net (Marcus Boerger) Hello Rasmus, Thursday, August 14, 2008, 7:36:29 AM, you wrote: > Larry Garfield wrote: >> I would also note that "include up front and have a good autoload scheme" >> works great if you are writing all classes. If you're trying to use >> namespaces and functions, there is no autoload. That makes the autoload >> argument moot, and pre-loading everything up front can get ridiculously >> expensive in large systems, and even then you don't always know what to load >> up front. (Think anything that accepts plugins.) So an answer of "well if >> it throws a warning when you do that, don't do that" is simply not realistic >> in practice. > With an opcode cache, it is actually often more efficient to load > everything up front even if you aren't using it all on any given > request. By using autoload or other conditional mechanisms you lose the > function and class caching mechanism provided by the opcode cache > because you have now pushed the creation of these to the executor > instead of letting the opcode cache cache them for you. > And assuming your include_path setting and your include hierachy is > clean so you don't have any or at least only minimal per-include stat > overhead, whether you include 1 or 20 files on a request isn't a big > deal since they are all going to be in memory anyway. See, this is something I fail to understant/accept. With all the crappy delayed inheritance and whatnot dynamic feature of the language it only seems fair that we develop apc in a way that it checks whether a class always gets created from the same file. Or at least we should provide a flag where apc would evaluate __autoload calls only once and then caches the results. If someone wants to screw up, it is their fault, erm their tradeoff, they'd simply get a much slower execution time as they wouldn't be able to use that optimization. Best regards, Marcus