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

Fixed #43 - Improving tree view creation #44

Merged

Conversation

jasongilman
Copy link
Contributor

This uses direct DOM manipulation instead of jQuery to provide better performance.

Performance before change for creating a tree view with N children:

  • 1000 - 59 ms
  • 10000 - 1451 ms
  • 100000 - 132278 ms

Performance after the change is:

  • 1000 - 5 ms
  • 10000 - 27 ms
  • 100000 - 216 ms

Note that I accidentally used the wrong issue number in my commit message.

@sglyon
Copy link
Contributor

sglyon commented Mar 27, 2016

💯

Thanks!

@pfitzseb
Copy link
Member

This is great, thanks a lot!

Interestingly enough, the view.find('> .body') isn't hoisted out of the loop, so

body = view.find('> .body')
body.append child for child in children

already gives a very significant speed up. Directly manipulating the DOM is still one order of magnitude faster though.

@pfitzseb pfitzseb merged commit 75d96bb into JunoLab:master Mar 27, 2016
@MikeInnes
Copy link
Member

Awesome work on this! I had noticed some issues here but put it down to the data transfer. FWIW, in future we're likely to implement lazy-loading of results in julia-client so that very few nodes are added to the tree at a time anyway. I'm not sure if we can usefully make that work across languages though.

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

Successfully merging this pull request may close these issues.

4 participants