Re: [Coding Standards] Loading all files at once

From: Date: Thu, 12 Jul 2007 14:27:46 +0000
Subject: Re: [Coding Standards] Loading all files at once
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47431@lists.php.net to get a copy of this message
[snip] If you use allfiles.php, you need to strip out all require_once calls - which isn't feasible for the unzip-and-go approach. Also, modifying files on installation is bad, because doing this, there will be dozens of different error sources, and bug tracking will begin with 'which installation options did you use?' because the installed files are not guranteed to look like the ones the developer uses to track down the bugs. Further, complicated things like conditional includes cannot just be stripped out from code while guranteeing that the code does not break. [/snip] If you need to do something like this you may want to simply use APC. Rasmus had this to say about someone trying to do a similar thing: "Note that what you are saving by combining the files into one is just a single stat syscall per file. And that can be alleviated by setting apc.stat=0 in your config. That of course means you need to restart your server or flush your cache whenever you want to update the files. In apc.stat=0 mode you gain nothing by merging all the files." Given APC will be in PHP6 by default that may be the better alternative. --Tony

« previous php.pear.dev (#47431) next »