Re: [Rd] Objectsize function visiting every element for alt-rep strings

2019-01-23 Thread Tomas Kalibera
On 1/22/19 6:17 PM, Kevin Ushey wrote: I think that object.size() is most commonly used to answer the question, "what R objects are consuming the most memory currently in my R session?" and for that reason I think returning the size of the internal representations of objects (for e.g. ALTREP obje

Re: [Rd] Objectsize function visiting every element for alt-rep strings

2019-01-23 Thread Travers Ching
It should be possible to calculate object.size in the presence of sharing, at least with respect to all sub-nodes of a SEXP. E.g., during calculation, keep a hash of all SEXP pointers visited. If a pointer has already been visited, add only the size of the pointer to the total object size. Trave