Skip to content
Prev 17844 / 21312 Next

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

Hi Alan,

It looks like what is slowing everything down significantly is the 
approach you've taken to look up the ExperimentHub resources that you 
control by name every time you need to access them. E.g:

Look up by name:

   > system.time(tt_alzh <- ewceData::tt_alzh())
   snapshotDate(): 2021-03-22
   see ?ewceData and browseVignettes('ewceData') for documentation
   loading from cache
      user  system elapsed
     2.496   0.024   9.460

Direct access:

   > system.time(tt_alzh <- eh[["EH5373"]])
   see ?ewceData and browseVignettes('ewceData') for documentation
   loading from cache
      user  system elapsed
     1.195   0.012   2.060

ewceData::tt_alzh() is just one of the 18 utility functions defined in 
ewceData that perform this lookup over and over again in the vignette 
and man page. This lookup is expensive and not needed since the 
ExperimentHub IDs that were assigned to your resources are fixed and 
known in advance.

Note however that it's a good idea to not expose these IDs to the end 
user (they might change at some point if you need to update these 
resources on ExperimentHub) so it's actually recommended to lookup by 
name in user-visible code.

Another easy improvement is that you drop dependency on 
ExperimentHubData. This will reduce the nb of deps (direct and indirect) 
from 130 to 94. There are likely other deps that you could try to get 
rid of.

Hope this helps,
H.
On 3/22/21 2:38 AM, Murphy, Alan E wrote: