On 2/2/11 10:05 PM, Johannes wrote:
I'm not sure if this was investigated at some point, but since the DIC
allows us to determine the dependencies between the different services
easily, we could compile the class/interface files for all dependent
services/classes into one file and load this one file before a service
is instantiated.
Since I haven't done any tests, I don't know how much we could gain by
this, but it would certainly save some round trips via the auto-loader.
We already have a class-compilation mechanism. But it only makes sense
for classes/interfaces that are always mandatory. You can add classes to
the cache in the DIC via the addClassesToCompile() method. For classes
that you might use but not always (Doctrine classes for instance), you
can optimize the autolaoder speed by adding them to the autoload class
map (via the addClassesToAutoloadMap() method).
These two mechanisms provide all the flexibility you need to have the
best speed possible when loading a class.
Fabien
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en