News for hackers. Stuff that matters.
Re:2012: A Year in PHP by h2s on Wednesday January 09, 2013 @02:47AM (#5030640)
This is a documented Zend Framework thing, so personally I wouldn't call it "contrived", "dumb" or "weird".

http://till.typepad.com/blog/2008/10/zendframework-performan...

    > Removing require_once in favour of __autoload shows
    > one of the biggest performance improvements in my
    > entire application - I shaved off roughly 220
    > milliseconds by removing about 15 (or so) calls to
    > require_once in my bootstrap.php file. And that's
    > with APC enabled, and a decent sized realpath.cache
    > (and .ttl).
Presumably this lazy loading approach starts being faster once your codebase exceeds a certain size. Everything you've said so far indicates that you tend to work on smaller, fire-and-forget PHP projects, so maybe this just doesn't resonate with your experience and I can certainly respect that.

No matter what your gut feeling about language-level features may be, I know that at my day job, we measured a clear performance boost when we removed require_once and switched completely to autoloading. For those of us working on very large, long-term PHP codebases, autoloading really is a good thing and I hope you can respect that in return.

Re:2012: A Year in PHP by contingencies on Wednesday January 09, 2013 @04:13AM (#5030802)
Good answer. I'm not saying that including code you don't want to use isn't going to shave of milliseconds, I'm just not convinced that the problem is being adequately identified. The problem honestly sounds like the codebase itself. And if that's something built with Zend, then perhaps that doesn't reflect well on Zend's innate structure, and Zend's only effective way around this is through 'autoload'.
Re:2012: A Year in PHP by wvenable on Wednesday January 09, 2013 @02:46PM (#5033076)
> The problem honestly sounds like the codebase itself.

Any reasonably sized codebase is going to load a lot of files. Because your projects are so small that this is not an issue is not a reflection on the quality of every one else's work.

Re:2012: A Year in PHP by contingencies on Thursday January 10, 2013 @10:21PM (#5041168)
The subject of the conversation: "Given that (a) we need to load files (b) loading files takes time ... do we, consider performance: (1) use an autoloader on some mega-framework; or (2) be explicit and require directly."

I feel this comment contributes nothing to the conversation but a baseless personal accusation.

Re:2012: A Year in PHP by wvenable on Friday January 11, 2013 @01:54AM (#5041685)
On the subject of the conversation, we can either let the computer do the work for us or waste time specifying it manually in a way that it's nearly impossible to do as effectively.

The code is already explicit enough, requiring directly is pointless busy-work that is more likely to be wrong.