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

Incremental rendering for performance? #328

Open
enjalot opened this issue Apr 15, 2021 · 4 comments
Open

Incremental rendering for performance? #328

enjalot opened this issue Apr 15, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@enjalot
Copy link

enjalot commented Apr 15, 2021

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 enjalot added the enhancement New feature or request label Apr 15, 2021
@mbostock mbostock changed the title avoid rerendering via dataflow for performance Incremental rendering for performance? Apr 15, 2021
@Fil
Copy link
Contributor

Fil commented Apr 21, 2021

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
Copy link
Contributor

Fil commented Jun 5, 2021

@tophtucker
Copy link
Contributor

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

@Fil
Copy link
Contributor

Fil commented Jun 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants