plot icon indicating copy to clipboard operation
plot copied to clipboard

Incremental rendering for performance?

Open enjalot opened this issue 4 years ago • 5 comments

Can Plot expose some kind of update() function so we could somehow either reuse elements or only re-render certain marks (like a rule + text that gets moved around based on input)

enjalot avatar Apr 15 '21 18:04 enjalot

I feel there are two very different ways to update a mark:

  • one is to just update the relevant mark with a data join + transitions, keeping the scales fixed to whatever setting they had from the initial data. This can be done in a plugin: https://observablehq.com/d/dd83bd6ccd0dec4f (contrived example)
  • the other is to "redo" everything that needs to be changed (including scales and their potential impact on other marks), optimizing for transitions.

Fil avatar Apr 21 '21 13:04 Fil

Another example here https://talk.observablehq.com/t/plot-update-pattern/5169

Fil avatar Jun 05 '21 19:06 Fil

Recent exploration by @Fil of animation in Plot https://observablehq.com/@fil/plot-animate-a-bar-chart

tophtucker avatar Jan 11 '22 17:01 tophtucker

Thanks to the new render transform, "animate a bar chart v2" is much leaner than v1.

Fil avatar Jun 05 '23 09:06 Fil