Skip to content

Commit

Permalink
try to speed up cue_format()
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 3, 2025
1 parent fafbe43 commit fa99d27
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions R/class_cue.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,14 @@ cue_format <- function(cue, target, meta, row) {
}
new <- .subset2(.subset2(target, "settings"), "format")
old <- .subset2(row, "format")
up_to_date <- (new == old) ||
((new == "auto") && (old %in% c("file", "qs")))
!up_to_date
if (new == old) {
return(FALSE)
}
if (new == "auto") {
return(!(old %in% c("file", "qs")))
} else {
return(TRUE)
}
}

cue_repository <- function(cue, target, meta, row) {
Expand Down

0 comments on commit fa99d27

Please sign in to comment.