[Bioc-devel] Methods to speed up R CMD Check

Hervé Pagès hp@ge@@on@g|thub @end|ng |rom gm@||@com
Tue Mar 23 17:46:54 CET 2021

On 3/23/21 4:11 AM, Murphy, Alan E wrote:
> Hi,
> Thank you very much Martin and Hervé for your suggestions. I have reverted my zzz.R on load function to that advised by ExperimentHub and had used the ID look up (system.time(tt_alzh <- eh[["EH5373"]])) on internal functions and unit tests. However, the check is still taking ~18 minutes so I need to do a bit more work. Even with my new on load function, calling datasets by name still takes substantially longer, see below for the example Hervé gave on my new code:
> a<-function(){
>    eh <- query(ExperimentHub(), "ewceData")

The above line is not needed. Creating an ExperimentHub instance can be 
quite expensive and with the current approach 'R CMD check' will do it 
dozens of times. My suggestion was to create an ExperimentHub instance 
once for all the first time you need it, and reuse it in all your data 
access functions:

   eh <- ExperimentHub()  # the only call to ExperimentHub() in
                          # the entire R session

Also there's no need to query(). Just use the EHb ID directly on the 
ExperimentHub instance to load your data:


This should reduce 'R CMD check' by a few more minutes.


Hervé Pagès

Bioconductor Core Team
hpages.on.github using gmail.com

More information about the Bioc-devel mailing list