JunoLab / atom-ink

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

Poor tree view creation performance when displaying many child entries #43

Closed jasongilman closed 8 years ago

jasongilman commented 8 years ago

The performance of creating a tree view with many child entries seems slower than that what I would expect. I'm using the tree view in Proto REPL for displaying the results of executing Clojure commands to provide inline explorable data structures. I ran some tests of displaying ranges of numbers between 0 and N where each number was a child view. I saw the following performance characteristics on my laptop:

Normally I wouldn't want to display 10K numbers in a list but this is a stand in for some of the larger nested maps which might have many children.

I'm working on improving Proto REPL performance and this is one of the slowest parts right now. Here's an image using the profiler with 10K numbers in Proto REPL. The rightmost area is the treeview creation.

proto_repl_display_10k_analysis

I'll have a pull request coming shortly with some dramatically better numbers.