I'm using sp_autoload with APC on a pretty loaded site without any
problem. Require_once/include_once is really slow... even if it s better in 5.2, it s still really slower than require or include. Autoload allow you to use basic include or require instead of the 'once' version. So, even if there is a little overload for autoload, it is less than the overload burned by the 'once' mechanics. Furthermore, include a file with an absolute path is really more efficient than relative because you don't rely on include_path. (Try to trace system calls to see how much it s differents) Using include or include_once with absolute path is not that easy in a framework. But it s really simple with autoload because you only have to manage prefix on autoload function. Autoload will allow you to include only what is needed, and don't lost time to manage the include section. If you are using a debug lib, you won't forget the include in source because you never call it in production then you don't autoload it. - sp_autoload allow to have multiple loader function. - The little overload used by autoload function is less important than the gain it give when using absolute include and save unused include (like old forgotten lib, debug lib or exceptions that are loaded but barely used) - You can use auto_prepend to init autoload, then you don't even think about class loading. Lars Strojny a écrit : Hi, Am Sonntag, den 07.01.2007, 05:00 -0500 schrieb Shekar C Reddy:I see at least one benefit to using autoload - load classes only as-needed. Changes to code/framework frequently need a re-visit to the require*() calls to see if any classes are loaded superfluously. Some classes loaded superfluously could load additional classes that may also be superfluous in a dynamic situation. But I'm still not clear with op-code caches as some say they had issues while others say they had no problems using them with autoload. Maybe, these got resolved with the later versions of PHP/op-code caches?To clear this thing up a bit: I'm using XCache with many of my projects and I can state that it works fine with autoload. You can see cached files in the stats which are just loaded via autoload. So no problem there. This also means, that there is no general problem with __autoload() and op-caches but potentially some of the caches out there have problems. But then we have the situation that they need to fix it. There is no need to work around buggy software. Can someone states similiar informations for eaccellerator, then Zend thingy and APC?Greets, Lars -- --------------------------------------------------------------------- Sorry, This disclamer is auto added by FW's company --------------------------------------------------------------------- |
Si vous n'etes pas destinataires de ce message, merci d'avertir l'expediteur de l'erreur de distribution et de le detruire immediatement. Ce message contient des informations confidentielles ou appartenant a La Francaise des Jeux. Il est etabli a l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message ou des informations qu'il contient, doit etre prealablement autorisee. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. La Francaise des Jeux decline toute responsabilite au titre de ce message s'il a ete modifie ou falsifie. If you are not the intended recipient of this e-mail, please notify the sender of the wrong delivery and delete it immediately from your system. This e-mail contains confidential information or information belonging to La Francaise des Jeux and is intended solely for the addressees. The unauthorised disclosure, use, dissemination or copying (either whole or partial) of this e-mail, or any information it contains, is prohibited. E-mails are susceptible to alteration and their integrity cannot be guaranteed. La Francaise des Jeux shall not be liable for this e-mail if modified or falsified.