in reply to Benefiting from Devel::Profile or Devel::FastProf
AUTOLOAD is a convenient-but-expensive mechanism. (See, e.g.: perlsub, AutoLoader, or perldoc perltoot.)
Ideally, you would structure your program so that it is not necessary. (But, maybe you can’t do that in this case. Okay.)
Furthermore, you might want to take a close look at the Plack family of packages, which provide a very good “universal compatibility-layer / grease-joint” mechanism for running your web programs in a variety of environments, particularly including “FastCGI,” and for switching the app more easily between different deployment strategies should you in the future identify the need to do so.
One reason why I make this suggestion is that, if you decide that autoloading really is the most expeditious way to structure this application (or that the notion of changing a crufty old piece of code is just too risky), these deployment strategies might allow you to make the existing application persistent for a little while, so that the cost of autoloading can be amortized over many successive web-requests instead of being paid by each and every one.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Benefiting from Devel::Profile or Devel::FastProf
by jonc (Beadle) on Jun 22, 2011 at 16:04 UTC | |
by Anonymous Monk on Jun 22, 2011 at 16:58 UTC | |
|
Re^2: Benefiting from Devel::Profile or Devel::FastProf
by locked_user sundialsvc4 (Abbot) on Jun 23, 2011 at 13:17 UTC |