Alternative wording of Q: What factors determine walltime for the lazyload DB step of R package installation?
I am developing an R package to make it easy for users to access consortium data. The size of the data directory is 4.5G, where all objects are compressed with bzip2. There are 202 individual .RData files, ranging from 133B to 24MB compressed.
When I install the package, the output looks something like this:
Downloading GitHub repo mypackage@HEAD
✓ checking for file ‘.../mypackage-1c6478a/DESCRIPTION’ ...
─ preparing ‘mypackage’:
✓ checking DESCRIPTION meta-information
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘mypackage_1.0.0.tar.gz’ (1.3s)
* installing *source* package ‘mypackage’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (mypackage)
The *** moving datasets to lazyload DB step takes the longest, about 5 minutes. What dictates walltime for this step? Number of objects? Size of objects? File compression? Is there anything I can do to make it install faster?
EDIT: I do want all of the R objects to be lazy-loaded, and I want them all to have accompanying documentation, so I believe the best practice is to keep the .rda files in data/. I am specifically wondering if there is a way to speed up the lazy-loading step when the package is being installed.