Skip to content
Prev 693 / 63424 Next

R-alpha: Using autoload and smaller 'base' package

On Wed, 29 Oct 1997, Paul Gilbert wrote:

            
Yes, though you can explicitly unload a package with
	detach("package:package") 
and it will still be reloaded automatically when needed.
Possible and easy, but not logical:

There's no strict limit to the number of packages, but the overhead goes
up sharply as the packages get smaller.  For the current sorts of package
the overhead would be trivial, but for one-function packages it would be
quite large.  Increasing the number of packages loaded also slows a lot of
things down, as the search path gets longer and longer. 

There is also some overhead on opening files, so loading lots of little
packages is slower than loading one big package.

I think autoload() is only worthwhile on largish, coherent blocks,
especially in its current interpreted form. Anything more ambitious would
probably require delving into the internal C code that finds and evaluates
things, and considering horrible things like caching and buffering for
disk access. 

	-thomas


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=