lazily materialize the groups#2031
Draft
Fil wants to merge 2 commits into
Draft
Conversation
mbostock
reviewed
Mar 22, 2024
Member
mbostock
left a comment
There was a problem hiding this comment.
I don’t like relying on Proxy to do this — it’s too magical. Can we instead change the group transform to not compute arrays of data unless explicitly requested?
Contributor
Author
|
More experimentation: I've pushed another strategy, even though I'm not convinced it's better. Maybe it will give us new ideas. |
…nsform, that needs to be invoked when we want to use the data. That means that downstream consumers of this need to know how to handle it. In the tests there is only one case, and it goes through arrayify, which is where I "decode" the structure. Not sure if it's any better.
23a29fe to
7c2a8b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes lazy calls to
take(which is expensive on arrow tables). The total # of calls totakein the tests goes from 34068 to 11778 (differenceY and differenceYVariable are the main consumers of this function). This should give better performance to the group transform on large datasets.Related: #2030