Re: Simple Namespace Proposal

From: Date: Sun, 22 Jul 2007 06:53:37 +0000
Subject: Re: Simple Namespace Proposal
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-31156@lists.php.net to get a copy of this message
On 7/21/07, Guilherme Blanco <guilhermeblanco@gmail.com> wrote:
I'll give you an example... PHP Doctrine package has a lot of files, hundreds... there is a way to compile it in a single file, to save some memory usage for including these files. Including a single file is better than include hundreds, as you may know. If you restrict it to a single namespace per file, Doctrine will load the hundreds, and not a single one anymore. So, any effort to compile scripts into a single file will be useless. Lukas Smith can provide more in this subject about how Doctrine works, but I just want to illustrate that you'll break some functionalities that current exists.
well. as all these files would use a single namespace everything will work just fine. By the way, are you sure that all of these files would really be needed on every request? My tests show that autoload + xcache/apc gives better results than loading everything at once -- Alexey Zakhlestin http://blog.milkfarmsoft.com/

« previous php.internals (#31156) next »