From tr@ver@c @end|ng |rom gm@||@com  Thu Jan 31 09:10:15 2019
From: tr@ver@c @end|ng |rom gm@||@com (Travers Ching)
Date: Thu, 31 Jan 2019 08:10:15 -0000
Subject: [Rd] Object.size() should not visit every element for alt-rep
 strings, or there should be an altstring_objectsize_method
Message-ID: <CAPLMX9FwLRo_whXQpGArrfghj2ckX7B0pW+b=6QdO=E68fS37g-7184@mail.gmail.com>


Below is a toy alt-rep string example, that generates N random strings:

https://gist.github.com/traversc/a48a504eb062554f2d6ff8043ca16f9c

example:
`x <- altrandomStrings(1e8)`
`head(x)`
[1] "2PN0bdwPY7CA8M06zVKEkhHgZVgtV1" "5PN2qmWqBlQ9wQj99nsQzldVI5ZuGX" ...
`object.size(1e8)`

Object.size will call the `set_altstring_Elt_method` for every single
element, materializing (slowly) every element of the vector.  This is
a problem mostly in R-studio since object.size is called
automatically, defeating the purpose of alt-rep entirely.



[Rd] Object.size() should not visit every element for alt-rep strings, or there should be an altstring_objectsize_method
Travers Ching