|Problems? Is your data what you think it is?|
Use of Autoloader in Modern Timesby Tommy (Chaplain)
|on Nov 15, 2012 at 19:50 UTC||Need Help??|
Tommy has asked for the
wisdom of the Perl Monks concerning the following question:
Should we be using Autoloader anymore?
Historically, the use of Autoloader (and autosplit) was to save time loading up libraries of code by tucking away the lesser-used library features into files that got pealed off the final installation of the library and automagically loaded up by perl when a call for such an autoloaded method was made.
The upside was that you saved load/compile time. The downside is that it is expensive to load up these files on demand with all the overhead incurred in such an operation, especially on a one-by-one basis.
What's Your Opinion?
So now that I've told everyone what you already know, I'll get to the point of my question:
It seems like the computational savings historically provided by Autoloader are quickly becoming irrelevant. I have made use of Autoloader in some of my modules and perhaps that has helped folks who used them in their early days, some ten years ago... but nowadays? Hmmmm. I think it probably does not.
So I am asking for your opinions on the subject; to me it seems like a logical decision to dump Autoloader (and autosplit). Do you see any reason(s) to the contrary? For a module that's only 2500 lines, does it make any sense at all to autosplit off 1000 of them anymore? Tests I've run on modern consumer-grade machines show extremely negligable gains, and on enterprise servers, the savings would be practically zero.
Are there reasons why we would continue to use Autoloader? What do you think, monks?
$ perl -MMIME::Base64 -e 'print decode_base64 "YWNlQHRvbW15YnV0bGVyLm1lCg=="'