javascript - AngularJS: How to keep UI responding to input in the middle of rendering a ng-repeat -
i've read several articles/posts on dangers of having large or complex dom changes inside ng-repeat. interesting , make sense.
i have big ng-repeat takes 10 seconds dom change , render in chrome (independent of download time, etc). result users need , willing wait data long, nice if still use rest of page while waiting.
these renderings happen in 50-100 loops of ng-repeat. during time, users unable "click around", is, clicks run ng-show or ng-hide directives wait ng-repeat rendering finish.
is there way browser run such functions, either in parallel or give priority ng-show/ng-hide functions, rather insisting on running ng-repeat in full? perhaps there way "manipulate dom/render in background" or lower priority? or perhaps there might way "break up" ng-repeat other interactions chance run in between iterations? imagine isn't simple inside guts of angularjs.
note: angularjs, not angular 2+.
i have big ng-repeat takes 10 seconds dom change , render in chrome (independent of download time, etc). result users need , willing wait data long, nice if still use rest of page while waiting.
javascript (angular in case) runs single threaded (an event loop) there nothing do.
in angular 1.x ngrepeat directive huge list pain , every developer solves own way.
however can improve usability. example:
- don't show results till loaded data. during period users can stuff
- don't load items in
ng-repeat. load 5-10load more ..button. or use infinite scroll feature load dynamically when user scroll list down - try remove amap watchers form list items (dropdowns, e.t.c)
Comments
Post a Comment