-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when rendering/expanding large R object in Variables tab #3628
Comments
Reported again in #3833. |
Reported on Mastodon too: https://mastodon.online/@[email protected]/112966300026506969 |
Reported again in #5270 with this example: # Need to do this first
# devtools::install_github('satijalab/seurat-data')
# SeuratData::InstallData("pbmc3k")
library(Seurat)
library(SeuratData)
pbmc3k.final <- LoadData("pbmc3k", type = "pbmc3k.final")
print("hi") Do |
Hi, I also just wanted to add that I ran into the same issue and suggest a maybe even easier way to reproduce the problem without downloading some extra files: system.time({
mat <- matrix(0, nrow = 1000, ncol = 1e5)
sce <- SingleCellExperiment::SingleCellExperiment(list(mat = mat))
})
print("hi") The creation of the SingleCellExperiment object takes 80ms on my computer, the console then freezes for 30 seconds before printing "hi". And also just to add, when I run the same code in a jupyter console with the ark kernel, there is no additional delay |
Reported again in #5333. |
Still able to repro with Jonathan's example:
with: |
The existing problem with
Probably because of https://github.com/posit-dev/ark/blob/f3fffe3d41bf0b33a7e34097c05f3b685b6bfaea/crates/harp/src/vector/formatted_vector.rs#L122-L129 We'll need a better way to iterate over an object that doesn't require formatting the whole column. |
This comment has been minimized.
This comment has been minimized.
There are pros and cons of using str for displaying the info. The main feature we want to support and using Another problem with |
@dfalbel Thank you for the clarification! I understand and respect your decision. I truly appreciate all the effort and dedication you’ve put into ARK. That said, some of RStudio’s approaches might be worth considering, such as skipping particularly large objects, setting rendering timeouts (like the in https://github.com/rstudio/rstudio/blob/main/src/cpp/session/modules/SessionEnvironment.R
In most cases, users only need a rough preview (especially the data hierarchy). For more detailed exploration, they are more likely to subset the object to inspect specific items or use tools like Data Explorer, rather than being limited to the variable pane. :) |
Thanks @ZhimingYe In the meantime, the fixes we have pushed will probably solve most of the problems, as a lot of the performance cost was caused by bugs in the formatting routine, triggering unnecessarily large computations. |
For: [PR 655](posit-dev/ark#655): Limits the number of bins for histograms to avoid crashes, addressing [issue 5744](#5744). [PR 654](posit-dev/ark#654): Adds more logging for Help proxy errors, addressing [issue 3543](#3543). [PR 646](posit-dev/ark#646): Refactors FormattedVector for faster formatting of S3 objects, improving performance when expanding large data.frames, related to [comment](#3628 (comment)).
Verified Fixed
Test scenario(s)Verified with Jonathans repro steps. Looks great. Link(s) to TestRail test cases run or created: |
Hello, Just letting you know that I started getting this error after installing the latest version on my system.
I did not see this error before with the previous version |
This new error you are seeing @pieterjanvc is #5813 and the fix will be included in the next release. Thanks for reporting! |
Discussed in https://github.com/posit-dev/positron-beta/discussions/220
Originally posted by mikemahoney218 June 20, 2024
Hi all,
When clicking to expand a large data frame in the Variables tab, I get the following error:
What happens next seems to vary; I've sometimes had this freeze the console so all input is ignored, and sometimes I've had the arrow in the Variables pane then turn down, even though it hasn't been expanded:
If the console freezes, I need to restart Positron entirely, not just the R session, to get it back.
The text was updated successfully, but these errors were encountered: