Re: Re: Performance Consideration of 1 class
| From: | Jon Parise | Date: | Mon, 26 Apr 2004 19:09:55 +0000 |
| Subject: | Re: Re: Performance Consideration of 1 class | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28382@lists.php.net to get a copy of this message | ||
On Mon, Apr 26, 2004 at 03:41:58PM +0200, Lukas Smith wrote:
> >>Based on this, I'd wager that using one class per file is better, even
> >>performance-wise. The brunt of the work is in the processing of the code
> >>(allocate/parse/compile), so any chance of not including code means time
> >>savings. Developers can only choose not to include a class if it is in a
> >>separate file.
> >
> >
> >... but if a pair of classes is *always* needed together, especially a
> >set of
> >small utility classes, then *requiring* them to live in seperate files
> >is just
> >plain silly. Why do you want to mandate this?
>
> to me its helps in finding relevant code quicker. This both from the
> users and from the computers POV (enabling stuff like autoload to work
> cleanly with minimal guess work).
The autoload argument is invalid here because the target class will
have already been loaded.
Let's stop worrying about mandating things like this. If a developer
does something silly, they'll either fix it or no one will use his or
her package.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)