Skip to content

Commit

Permalink
Merge pull request #648 from nlmixr2/647-fast-gives-bad-alloc-occasio…
Browse files Browse the repository at this point in the history
…nally

Fallback to archive
  • Loading branch information
mattfidler authored Feb 7, 2024
2 parents 39e3d35 + 6f97fc5 commit 4df2d59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ rxUiDecompress <- function(ui) {
rxUiCompress <- function(ui) {
if (!inherits(ui, "rxUi")) return(ui)
if (is.environment(ui)) {
.ret <- qs::qserialize(ui, preset="fast")
.ret <- try(qs::qserialize(ui, preset="fast"), silent=TRUE)
if (inherits(.ret, "try-error")) .ret <- qs::qserialize(ui, preset="archive")
class(.ret) <- c("rxUi", "raw")
return(.ret)
}
Expand Down

0 comments on commit 4df2d59

Please sign in to comment.