Skip to content

snapshot_review() app stalls for large diffsΒ #1990

@wurli

Description

@wurli

Really, if anyone's using such large snapshots it's arguable that they're the problem. That said, it would be nice if the shiny app used by snapshot_review() could make some concession for very large diffs, even if that just meant failing gracefully. Ideally some kind of pagination might be an alternative solution.

Here's a reprex. For me it takes around 1,000,000 lines before things become truly unusable.

text_a <- sample(c(stringr::words), 1000000, replace = TRUE) |> paste(collapse = "\n")
text_b <- gsub("ab", "cd", text_a)

dir <- file.path(tempdir(), "_snaps", "text")
dir.create(dir, recursive = TRUE) 
writeLines(text_a, file.path(dir, "text.txt"))
writeLines(text_b, file.path(dir, "text.new.txt"))

testthat::snapshot_review(path = tempdir())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions