How to replicate the package check time performed on CRAN?
Asked Answered
R

0

6

I've been trying to reduce the check time on a package I am submitting to CRAN. On my local machines, check time is somewhere between a minute (i7 CPU) and 2 minutes (i5 CPU). However, CRAN reviewers keep pointing out the check time is over 10 minutes. The only way I could find to reproduce such long check times is by uploading my package to http://win-builder.r-project.org/, where it indeed takes > 600 s to check.

I wish I could reproduce this check time locally so I am not dependent on a remote solution. The only difference I can see between Win builder and my local machine is the OS (Win vs. Linux) and how Win builder seems to be doing multiarch checks (i386 and x64).

I am not sure how to reproduce this locally. I have tried R CMD check with seemingly-relevant switches like --multiarch and --force-multiarch but it doesn't seem to be doing anything differently. I guess I have to install some extra packages like r-cran-i386 or whatever, but I couldn't find anything of the sort in my repositories ("R" can be such a PITA of a search expression) and the instructions on README files like the one on https://cran.r-project.org/bin/linux/ubuntu/ didn't get me far enough.

I am already using --as-cran, and am aware of solutions like this, though I think installing R i386 on a separate VM containing a 32-bit OS defeats the purpose of what I am trying to accomplish.

Rebellion answered 3/8, 2020 at 8:44 Comment(5)
Is your package on github? Can you provide a link?Darky
@Darky Sure thing, the release candidates are being commited to github.com/ocbe-uio/DIscBIO/tree/release-1.0. The latest Win check results are on win-builder.r-project.org/mxCRp6eh5khJ (valid for "roughly 72 hours")Rebellion
Running the Rcmd.exe check --as-cran DIscBIO_1.0.0.tar.gz on my Win10 system took about three to four minutes. But I had to install your dependencies first and that took quite long (your dependency tree is large and I think enrichR took particularly long). I even get a note "Imports includes 22 non-default packages. Importing from so many packages makes the package vulnerable to any of them becoming unavailable. Move as many as possible to Suggests and use conditionally."Darky
Thank you for your help, @Roland. I am aware of that note and managed to get the number of dependencies down to 22 from 28, but I am afraid there's little code left to cut without dropping major features. FWIW, enrichR was one of the dropped packages, I apologize for not updating the README file. I did just notice that the Travis builds are almost 2x faster than they used to be, so maybe I should try a new submission and hope this translates into a passable check time for the reviewers.Rebellion
Thanks to @Roland, I just realized I forgot to remove enrichR (and a couple other packages) from the list of suggested packages in the DESCRIPTION. This saved a few seconds on the Win builder check time, though I am still over the 600-second mark.Rebellion

© 2022 - 2024 — McMap. All rights reserved.