Skip to content

Commit

Permalink
Default to 'serializedSize' [#736]
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jul 28, 2024
1 parent af7055d commit 21fe894
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: future
Version: 1.33.2-9010
Version: 1.33.2-9011
Title: Unified Parallel and Distributed Processing in R for Everyone
Imports:
digest,
Expand Down
6 changes: 0 additions & 6 deletions R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,5 @@ update_package_options <- function(debug = FALSE) {

## future 1.34.0:
update_package_option("future.globals.objectSize.method", mode = "character", debug = debug)
if (is.null(getOption("future.globals.objectSize.method"))) {
if (exists("serializedSize", envir = getNamespace("parallelly"), inherits = FALSE)) {
options(future.globals.objectSize.method = "serializedSize")
}
}

update_package_option("future.plan.cleanup.legacy", mode = "logical", debug = debug)
}
2 changes: 1 addition & 1 deletion R/utils-objectSize.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ objectSize <- function(x, depth = 3L, enclosure = getOption("future.globals.obje
if (isNamespace(x)) return(0)
if (depth <= 0) return(0)

method <- getOption("future.globals.objectSize.method", "objectSize")
method <- getOption("future.globals.objectSize.method", "serializedSize")
if (method == "serializedSize") {
size <- serializedSize(x)
return(size)
Expand Down

0 comments on commit 21fe894

Please sign in to comment.