Skip to content
Prev 58795 / 63424 Next

Speed-up/Cache loadNamespace()

Mario,

On unix if you use Rseve you can pre-load all packages in the server (via eval config directive or by running Rserve::run.Rserve() from a session that has everything loaded) and all client connections will have the packages already loaded and available* immediately. You could replace Rscript call with a very tiny Rserve client program which just calls source(""). I can give you more details if you're interested.

Cheers,
Simon


* - there are some packages that are inherently incompatible with fork() - e.g. you cannot fork Java JVM or open connections.