2

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

asked Jul 11, 2011 at 17:42
1
  • Are you using APC or another bytecode cache? If so, and as long as none of the autoload functions abuse things that call stat, autoload is rarely a performance problem. Commented Jul 11, 2011 at 18:33

1 Answer 1

5

Profile the PHP code

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.

answered Jul 11, 2011 at 18:16
1
  • 2
    thanks 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 :) Commented Jul 13, 2011 at 13:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.