I have an application which does heavy autoloading, meaning, that only two classes are "included" directly. For every module tha the application has (total like 14 modules), that module defines an autoloader. However, I wanted to know if is too time expensive to load all classes using autoloaders and what could I do to speed it up.
As a side note, at this point I'm not experiencing a slow application, I'm just trying to predict if it could happen.
Thanks in advance
1 Answer 1
We are terrible at determining the computer runtime of a process. While 14 modules may feel like a lot to you, keep in mind that we are terrible at judging what you're trying to do. Profiling the code now, and during future development as the project expands, is the way to go.
Aside from the PHP, you should also check other factors in your web application to ensure its speediness. YSlow is a reputable tool for doing so.
-
2thanks for the reply. About YSlow, don't worry Im a client performance fan and follow the their rules and PageSpeed's rules to the letter! Well, mostly :)David Conde– David Conde2011年07月13日 13:22:23 +00:00Commented Jul 13, 2011 at 13:22
stat
, autoload is rarely a performance problem.