Newsgroups: php.internals,php.pear.dev Path: news.php.net Xref: news.php.net php.internals:9538 php.pear.dev:28313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94846 invoked by uid 1010); 24 Apr 2004 14:24:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94774 invoked from network); 24 Apr 2004 14:24:25 -0000 Received: from unknown (HELO longsword.omniti.com) (66.80.117.3) by pb1.pair.com with SMTP; 24 Apr 2004 14:24:25 -0000 Received: from [66.80.117.254] (helo=[10.0.1.24]) by longsword.omniti.com with asmtp (TLSv1:RC4-SHA:128) (Exim 4.14) id 1BHO4v-0006HC-Tu; Sat, 24 Apr 2004 10:24:25 -0400 In-Reply-To: <408A7724.8020908@sebastian-bergmann.de> References: <4089E106.4040409@akbkhome.com> <408A138C.2010801@cschneid.com> <408A7724.8020908@sebastian-bergmann.de> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <5D895506-95FB-11D8-81F9-000393B2B3C0@omniti.com> Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Sat, 24 Apr 2004 10:26:24 -0400 To: X-Mailer: Apple Mail (2.613) Subject: Re: [PHP-DEV] Performance Consideration of 1 class per file From: george@omniti.com (George Schlossnagle) On Apr 24, 2004, at 10:18 AM, Sebastian Bergmann wrote: > Christian Schneider wrote: >> I guess someone _that_ considered about performance could easily do a >> cat *.php | grep -v require | php -w >app.lib >> or the like and include app.lib. > > Maybe the PEAR Packager / Installer could be changed to (optionally?) > create a single source file (without require/include statements) > comments, whitespace) from all role="php" s and use this for > deployment. Having naively tried this in the past, a couple comments: 1) it's not as simple as it sounds, especially if you have includes that do more than just declare functions and classes. 2) it's hard to debug when things go wrong, as the sources aren't where you had them. 3) if you have any conditional includes, 3a) things can easliy break 3b) you often end up doing more work and being slower than using the includes I don't think this is a truly awful idea, but should be approached with a high degree of caution, as it's pretty brittle. George