Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan for nested ALTREP objects #4292

Merged
merged 1 commit into from
Feb 12, 2019
Merged

Scan for nested ALTREP objects #4292

merged 1 commit into from
Feb 12, 2019

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.

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.

None yet

3 participants