Skip to content

Conversation

@jmcphers
Copy link
Member

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.

@jmcphers jmcphers requested a review from kevinushey February 12, 2019 00:21
Copy link
Contributor

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jmcphers jmcphers merged commit af0c826 into master Feb 12, 2019
@jimhester
Copy link
Contributor

Great, thanks!

@valerie-rstudio valerie-rstudio deleted the bugfix/nested-altrep branch January 21, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants