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:

  eh[["EH5373"]]

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

H.

--
Hervé Pagès

Bioconductor Core Team
hpages.on.git...@gmail.com

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to