I have created an R script that it needs to load some libraries first.
The problem is that the script needs 1.6 seconds to finish its calculations (measured it many times with Linux command "time") and 0.7 seconds only takes to load the libraries!
The script runs quite often, so the delay for library loading accounts to almost 80% of the real workload!
Is there any way to have the libraries preloaded so that they won't be loaded each time the script runs?
Any other suggestion to bypass this slowness?
#!/usr/bin/Rscript
library(methods, quietly=TRUE, warn.conflicts = FALSE)
library(MASS, quietly=TRUE, warn.conflicts = FALSE)
library(RBGL, quietly=TRUE, warn.conflicts = FALSE)
library(igraph, quietly=TRUE, warn.conflicts = FALSE)
library(bnlearn, quietly=TRUE, warn.conflicts = FALSE)
library(gRbase, quietly=TRUE, warn.conflicts = FALSE)
library(gRain, quietly=TRUE, warn.conflicts = FALSE)
..
..