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

@jmcphers jmcphers commented Feb 12, 2019

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 Feb 12, 2019
Copy link
Contributor

@kevinushey kevinushey left a comment

LGTM!

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

@jimhester jimhester commented Feb 15, 2019

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants