Skip to content

Commit

Permalink
move overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 3, 2025
1 parent acbb8b5 commit b76fbd1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Use a more lookup-efficient data structure for `tar_runtime$file_info` (#1398).
* Fall back on vector aggregation without names (#1401, @guglicap).
* Reduce overhead in `tar_outdated()` by at least 33% (#1408).
* Make `tar_outdated()` run about 4.6 times faster (#1408).
* Speed up representation of file sizes in metadata (#1408). This may slow down the next call to `tar_outdated()`/`tar_make()` in existing pipelines, but the new file size format will update in the metadata during the next `tar_make()`. After that, `tar_outdated()` should run much faster.
* Add a new `"forecast_interactive"` reporter to `tar_outdated()` to choose `"forecast"` for interactive sessions and `"silent"` for non-interactive ones.
* Add a new `seconds_reporter_outdated` argument to `tar_config_set()` with a default of 0.5 to control the time interval of the reporter of `tar_outdated()` and other passive algorithm functions.
Expand Down
4 changes: 2 additions & 2 deletions R/class_branch.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ branch_init <- function(
) {
deps <- setdiff_chr(
x = unique.default(c(deps_parent, deps_child)),
y = settings$dimensions
y = .subset2(settings, "dimensions")
)
branch_new(
name = name,
command = command,
seed = tar_seed_create(name),
deps = deps,
deps = sort_chr(deps),
settings = settings,
cue = cue,
store = store,
Expand Down
1 change: 0 additions & 1 deletion R/class_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ meta_class <- R6::R6Class(
.subset2(.subset2(lookup, name), "data")
},
hash_deps = function(deps, pipeline) {
deps <- sort_chr(deps)
hashes <- lapply(X = deps, FUN = hash_dep)
names(hashes) <- deps
hashes <- unlist(hashes, use.names = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/utils_language.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ deparse_script_code <- function(code) {
deps_function <- function(fun) {
env <- list(`~` = `identity`)
body(fun) <- eval(call("substitute", body(fun), env), envir = baseenv())
codetools::findGlobals(fun)
sort_chr(codetools::findGlobals(fun))
}

#' @export
Expand Down

0 comments on commit b76fbd1

Please sign in to comment.