AlexSuleap / angular-tree-widget

Angularjs tree control, which does not require jquery.
http://AlexSuleap.github.io
MIT License
34 stars 13 forks source link

Very slow in IE 11 #18

Open rakiUK opened 7 years ago

rakiUK commented 7 years ago

Currently I am facing an issue with this tree widget, that is very slow rendering in IE11, where as in chrome it works as expected. There are around 2200 items(_including nested) in the tree . I have tried to put limitTo:10 for ng-repeat but still the problem exists.

Any pointers to improve the performance in IE (atleast similar to chrome) will be really helpful.

Thanks very much.

igorlino commented 7 years ago

First of all, its a nice looking widget. Thanks @AlexSuleap

Taking a look at the code of the library and some example in my own code, this are my findings: 1) The root problem in this widget is that is generates way too many angular handlers. Tree data structure tend to be larger biggish. (that's why we often need them) A simple list of some hundreds of items will easily take 2000 angular handlers.

(Recomendation for a webapp based on angular, in total, not to exceed 3000 handlers, so its of course dificult to have a widget that consumes 66% already by itself)

2) I think, in general with widgets, relying too much on angular to generate the widget html is a very expensive thing to do, and does not scale.

I think one has to rewrite several parts of the widget to improve the performance. Perhaps the following will help:

I think this would reduce by 80-95% the angular handlers, and definitively the rendering will much faster.