Improving Nested Ng-repeat + Directive Performance
Solution 1:
In this case it sounds like you're rendering a lot more information that would be able to be visible at any one time. So you could:
Rethink the interface with some sort of pagination, so you only render a screen of information at any one time. Or maybe a limit on the number of weeks you can show at any one time.
Create some sort of directive that removes its contents (i.e. via an
ngIf
) if its not visible on the screen. Perhaps listening to (a debounced) scroll event on the window, and calling functions from http://verge.airve.com/ to test if any part of it is visible. It might be tricky to sort out the vertical sizes of the elements in this case, so it slightly depends on your use-case.To clarify, this would have to remove the contents before it gets rendered by Angular, and not just hide the elements.
Solution 2:
Hei, "assigment" is a directive, right? maybe you should paste the directive code here as well.
I once ran into the rendering delay, caused by ng-bind-html, don't know if you used it.
Post a Comment for "Improving Nested Ng-repeat + Directive Performance"