ropensci / rsnps

Wrapper to a number of SNP web APIs
https://docs.ropensci.org/rsnps
Other
52 stars 22 forks source link

How to deal with long running vignette chunk? #135

Closed jooolia closed 2 years ago

jooolia commented 2 years ago

Describe the bug The chunk "allgensnp" in the vignette is often very slow. Is this ok? Do we need to manage this chunk by caching or having the data otherwise available? what is the best practice?

Or maybe it is ok? How can we find out what an acceptable build time for vignettes is?

Code to reproduce

library(rsnps)
x <- allgensnp(snp='rs7412')
head(x)

Timing it right now:


system.time(x <- allgensnp(snp='rs7412'))

user system elapsed 3.361 0.042 72.831

Maybe a bit over a minute is ok? I would like to find some guidelines on this so that we can know.

jooolia commented 2 years ago

Ideas here:https://blog.r-hub.io/2020/06/03/vignettes/#how-to-include-a-compute-intensive--authentication-dependent-vignette