From fa99d27d0ddbb6282be23aeedc2199199ce84ecb Mon Sep 17 00:00:00 2001 From: wlandau Date: Fri, 3 Jan 2025 10:48:16 -0500 Subject: [PATCH] try to speed up cue_format() --- R/class_cue.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/class_cue.R b/R/class_cue.R index abd0ce0c..f5017ea3 100644 --- a/R/class_cue.R +++ b/R/class_cue.R @@ -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) {