How to profile the loading of an R package
So an issue with using the detach method from @davide-lorino is that if there are entangled depends
or imports
, it will fail, and fail hard.
A better method is to use a future
backend that loads each of the import
s in a clean R session, and time how long it takes to load them via library
.
I implemented this in a package that might be useful to others: https://github.com/rmflight/importedPackageTimings