angularjs - Overcoming UI blocks when updating ng-repeat data -


so yes, apparently possible have long grid lots of rows built angular. problem comes data updates.

you see if (let's 10 000 rows) , render them in grid - works. takes few seconds initially. ,

a) don't have date front b) need grid responsive immediately.

i can throwing let's 100 rows @ beginning, , update data becomes available. , turns out problem. everytime push new rows $scope.data - blocks ui. need smart these updates.

  • maybe should set interval , update data every few seconds? that seems not working
  • maybe should somehow watch mouse movements , once stops moving - start/resume adding rows, once mouse-movement detected seize adding rows , wait chance? - what if user never stops moving mouse? (say sort of psycho)
  • experimenting _.throtle , _.debounce didn't me anywhere.

    you guys have ideas?

upd: here's crazy one: if? instead of waiting till angular updates dom, create entire dom structure in memory, right before digest cycle (with no data) , insert html chunk (that faster, right?) , after let angular magic, data should appear. work?

you going run performance issues when changes if can rows rendered dom. , user isn't going scroll through 10000 rows anyway. use pagination. e.g.:

<div ng-repeat="item in items | startfrom:currentpage*itemsperpage | limitto:itemsperpage"></div> 

if want have on 1 page load rows user scrolls. if interested in solution checkout http://binarymuse.github.io/nginfinitescroll/


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -