observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.25k stars 173 forks source link

lazily materialize the groups #2031

Open Fil opened 5 months ago

Fil commented 5 months ago

Makes lazy calls to take (which is expensive on arrow tables). The total # of calls to take in 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

Fil commented 5 months ago

More experimentation: I've pushed another strategy, even though I'm not convinced it's better. Maybe it will give us new ideas.