Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upScan for nested ALTREP objects #4292
Conversation
|
LGTM! |
|
Great, thanks! |
RStudio is already aware of ALTREP objects and avoids attempts to compute their size (which cause them to materialize). However, ALTREP objects can be inside of other objects, and we need to avoid computing the size of those, too. A good example is data frames generated by the vroom package (https://github.com/jimhester/vroom), which are not ALTREP objects themselves but which contain ALTREPs.
This change implements a simple form of recursive scanning for ALTREP objects. It is intentionally limited to vectors (e.g. data frame columns), and the reentrancy, depth and breadth of the search are also constrained to avoid accidental traversal of large or pathological objects.
Fixes #4171.