Skip to content
Prev 9358 / 12125 Next

[R-pkg-devel] Issue with CPU time > 2.5 times elapsed time

Hi Jan,

I faced a similar issue recently with the imager package, see https://stat.ethz.ch/pipermail/r-package-devel/2023q2/009042.html for the email thread on this list. In your case, it's probably data.tables creating more threads than what you think are being created, but you might want to double-check.

It ultimately boils down to you having to constrain the number of threads your code and dependencies use during tests/vignettes/example runs. After guidance from Dirk, I painstakingly ended up doing exactly that for our package, see https://github.com/asgr/imager/compare/0ef8afd6249506bfec98c1250a0a2558149d88d9...47d59a942d04cef8bd7cb2d36be926d637e3df11

Regards,

Rodrigo