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

Improve render performance of render each #751

Open
jwstegemann opened this issue Feb 11, 2023 · 1 comment
Open

Improve render performance of render each #751

jwstegemann opened this issue Feb 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jwstegemann
Copy link
Owner

For larger lists and/or situations, where often a long list of patches results from the diff of two consecutive versions of the lists, it might be a good idea to

  • batch all patches in a list when diffing
  • copy the mount-point node
  • apply all patches to the (invisible) copy
  • switch original mount-point-node and copy

This should improve rendering performance, avoid flickering when for example sorting a huge table, and make sure that animations on single elements all start at the same time (when the copy is mounted to the dom).

For small lists or lists that only result in very few patches between two versions, this might add some unnecessary overhead, so we would either accept this or find a way to make this behavior controllable over the api.

@jwstegemann jwstegemann added the enhancement New feature or request label Feb 11, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

As we already have four parameters for renderEach we must be careful to add another one.

Probably it makes more sense to encapsulate this behavior into the function name (renderBatch, renderEachBatched or alike).

We should first consider to try to measure whether we need two behavior variants, or we can stick only to the proposed one. This would be the best solution, as the user must not make any design decisions upfront.

@jamowei jamowei added this to the 1-0-RC6 milestone Jun 5, 2023
@Lysander Lysander removed this from the 1-0-RC6 milestone Jun 20, 2023
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