in reply to Selfloader - testimonies or potential uses?

The idea is to delay the compilation of functions until they are used. This could be useful when few of the functions are actually executed. For example, CGI uses functionality similar to SelfLoader because most of CGI's users use only a fraction of the functions it provides. The savings are magnified since CGI is used in an environment where it can be loaded at great frequency.

I wonder how much benefit it provides, if any. Its effect on the method cache could be costly.

  • Comment on Re: Selfloader - testimonies or potential uses?

Replies are listed 'Best First'.
Re^2: Selfloader - testimonies or potential uses?
by chromatic (Archbishop) on Jun 04, 2007 at 17:00 UTC
    I wonder how much benefit it provides, if any. Its effect on the method cache could be costly.

    If you're in an environment where startup time is the largest component of the work, SelfLoader might be an advantage. (In terms of CGI programming, it's very difficult for me to believe that even loading and compiling all of CGI.pm would take more time than performing network IO, but with short-lived processes, the method cache misses wouldn't be as painful.)