I posted this on r-devel, but got no response. Since it's an issue that mostly affects rstudio, I thought I'd post it here.
I have a toy alt-rep string package that generates randomly seeded strings.
In R command line it works fine:
example:
library(altstringisode)
x <- altrandomStrings(1e8)
head(x)
[1] "2PN0bdwPY7CA8M06zVKEkhHgZVgtV1" "5PN2qmWqBlQ9wQj99nsQzldVI5ZuGX" ... etc
In Rstudio, I think Rstudio calls object_size or Object.size? At any rate, on instantiation, the set_altstring_Elt_method is called for all elements 1 through 1e8 which forces materializing (slowly) of every element of the vector.
This is a problem since the purpose of alt-rep is to defer evaluation until necessary.
System details
RStudio Edition : Any
RStudio Version : Any
OS Version : Any
R Version : 3.5+
Steps to reproduce the problem
Make an alt rep string object
Describe the problem in detail
Describe the behavior you expected
Rstudio shouldn't force evaluation of alt rep string objects and possibly other alt-rep types
I posted this on r-devel, but got no response. Since it's an issue that mostly affects rstudio, I thought I'd post it here.
I have a toy alt-rep string package that generates randomly seeded strings.
In R command line it works fine:
In Rstudio, I think Rstudio calls object_size or Object.size? At any rate, on instantiation, the
set_altstring_Elt_methodis called for all elements 1 through 1e8 which forces materializing (slowly) of every element of the vector.This is a problem since the purpose of alt-rep is to defer evaluation until necessary.
System details
Steps to reproduce the problem
Describe the problem in detail
Describe the behavior you expected