Re: Performance Consideration of 1 class per file
| From: | George Schlossnagle | Date: | Sat, 24 Apr 2004 14:26:24 +0000 |
| Subject: | Re: Performance Consideration of 1 class per file | ||
| References: | 1 2 3 4 | Groups: | php.internals php.pear.dev |
| Request: | Send a blank email to internals+get-9538@lists.php.net to get a copy of this message | ||
On Apr 24, 2004, at 10:18 AM, Sebastian Bergmann wrote:
Christian Schneider wrote: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. GeorgeI 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" <file>s and use this for deployment.