traversc / qs

Quick serialization of R objects
397 stars 19 forks source link

Suggestion : default parameter nthread #79

Closed BenjaminDEMAILLE closed 5 months ago

BenjaminDEMAILLE commented 1 year ago

Hi ! is it possible in a future version to do in default

nthreads = parallel::detectCores()

thanks

traversc commented 1 year ago

My preference is to keep the default as 1, but this could be an option:

options(qs.nthreads = 4)

qsave <- function(..., nthreads = getOption("qs.nthreads", 1L)) {
  ...
}

Does that work?

HenrikBengtsson commented 8 months ago

I downvote the feature request for nthreads = parallel::detectCores(), and upvote "keep the default as 1", because of several reasons, which I write about in https://www.jottr.org/2022/12/05/avoid-detectcores/.