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

Allow to temporarily disable updates to improve performance on bulk updates #607

Closed
mar10 opened this issue Jun 18, 2016 · 2 comments
Closed

Comments

@mar10
Copy link
Owner

mar10 commented Jun 18, 2016

(Brought up by @u-874: see #553)

Dynatree had something like tree.enableUpdate(enable) that returned the previous state, which makes it easier to restore in nested calls. It also forced a redraw on enableUpdate(true).
See http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html

It would be good to have tests for it (benchmarks) so we can compare different approaches.

Instead (or additionally) to suppress rendering, we should also benchmark performance, when the tree root element is detached while adding nodes (see https://api.jquery.com/detach/)

mar10 added a commit that referenced this issue Jul 3, 2016
@mar10 mar10 added the waiting label Jul 12, 2016
@mar10
Copy link
Owner Author

mar10 commented Jul 12, 2016

Waiting for @u-874 's response to #553

@mar10
Copy link
Owner Author

mar10 commented Aug 5, 2016

Poor performance can be observed if we are adding many child nodes to a node that is already expanded (currently empty nodes cannot be expanded, so at least one child must already exist).

This means

  1. FASTEST: add nodes to a collapsed parent and keep collapsed
  2. FAST: Add nodes to a collapsed parent, then expand
  3. Equally FAST: Add nodes to an expanded parent, but wrap it inside enableUpdate(false/true)
  4. REALLY SLOW: Add nodes to an expanded parent

Some benchmarks for a tree table:
bildschirmfoto 2016-08-05 um 15 16 43

@mar10 mar10 closed this as completed in b6baa58 Aug 5, 2016
@mar10 mar10 removed the waiting label Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant