-1

there. I am creating a Stan-based R package. I know that the devtools::check(args = c('--as-cran')) runtime (which involves compiling the C++ codes) is slow. In my case, it takes about 20 minutes. Fortunately, the devtools::check_win_release() and devtools::build() commands are quick in a few seconds.

However, I recently link the package to my GitHub repository for the version control. The differences are the additional README.md and README.Rmd files. And, I have added ^README\.Rmd$ and ^README\.md$ to .Rbuildignore. Now, I notice that the runtime for devtools::check_win_release() and devtools::build() becomes very slow. It will display the message "installing the package to process help pages" for quite a bit of time and then continue on.

What has caused this issue? Any comments? Thanks.

  • It seems very unlikely that using github or a readme would change the build process that much. Are you also ignoring the .git files? There's really not a lot of details here to say what's going on. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) that can be used to test and verify possible solutions. – MrFlick Aug 26 '21 at 06:04
  • So, that's my .Rbuildignore file. – Dexter SherloConan Aug 26 '21 at 06:12
  • ^myProj\.Rproj$ ^\.Rproj\.user$ ^LICENSE\.md$ ^data-raw$ ^\.travis\.yml$ ^\.DS_Store$ ^\.o$ ^\.so$ ^\.dll$ ^\.Rhistory$ ^README\.Rmd$ ^README\.md$ – Dexter SherloConan Aug 26 '21 at 06:17
  • One execution message draws my attention: "saving partial Rd database (14m 25.4s)". – Dexter SherloConan Aug 26 '21 at 06:33
  • Are your documentation files large? Do you have long running examples? It’s really not fun to have to psychically guess what might be going on. Maybe include a link to your repo? – MrFlick Aug 26 '21 at 07:14

1 Answers1

0

Yes, I have figured it out. (Nothing wrong with GitHub)

So, I changed the documentation for the data: I used to write as @source \url{http://dx.doi.org/SOMETHING}; however, devtools::check_win_release() suggests I use @source \doi{SOMETHING}; so I changed it.

Then, the issue occurs. The building messages used to be like

✓  checking for file ‘*/DESCRIPTION’ ...
# ─  preparing ‘*’:
# ✓  checking DESCRIPTION meta-information
# ─  cleaning src
# ─  checking for LF line-endings in source and make files and shell scripts
# ─  checking for empty or unneeded directories
# ─  building ‘*_*.tar.gz’
#
# [1] "*/*.tar.gz"

Now, it becomes (running slow for "installing the package to process help pages")

# ✓  checking for file ‘*/DESCRIPTION’ (611ms)
# ─  preparing ‘*’: (2.2s)
# ✓  checking DESCRIPTION meta-information ...
# ─  cleaning src
# ─  installing the package to process help pages
# ─  saving partial Rd database (14m 25.4s)
# ─  cleaning src
# ─  checking for LF line-endings in source and make files and shell scripts
# ─  checking for empty or unneeded directories
# ─  building ‘*.tar.gz’
#
# [1] "*/*.tar.gz"

At last, I delete @source and just leave @references. The issue solved.