JunoLab / atom-ink

IDE toolkit for Atom
MIT License
228 stars 40 forks source link

Fixed #43 - Improving tree view creation #44

Closed jasongilman closed 8 years ago

jasongilman commented 8 years ago

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

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

Performance after the change is:

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

sglyon commented 8 years ago

:100:

Thanks!

pfitzseb commented 8 years ago

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.

MikeInnes commented 8 years ago

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.