Hi Sander,

I would like to see your implementation. By the way, I've updated my fiddle 
with the new filter implementation. I saw that the filter function is 
called 2 times for each scroll increment. Although this new fiddle has 1 
million of elements, it's faster than the previous.

Regarding the scroll bar, I saw that the example does not work in my case. 
The scroll bar size must be proportional to the total number of itens in 
the $scope.data, and not proportional to the rendered itens, that will 
always be fixed and equals to $scope.pageSize.

*http://jsfiddle.net/averri/764tc/30/*



Em quinta-feira, 6 de março de 2014 12h18min36s UTC-3, Sander Elias 
escreveu:
>
> Hi Alexandre,
>
> Build a custom filter, that way you can speed things up considerable. 
> First thing, make it cacheable. if the input does not change, there is no 
> need to traverse the data again. This alone might be enough to solve your 
> problem.
> Second thing, let it stop if it find's for example 100 results. Tell the 
> user there are 100+ results. If really needed you can make a 'count-all' 
> option if the user really needs to know how many results there are.
> third thing, combine filters. do as much as possible in 1 pass over the 
> data.
>
> If you want, I wrote an example of this, I can dig up the link?
>
> Oh the link I gave in my previous msgs is a dead end. It shows how to turn 
> on a build-in scroll-bar, but I found no way of controlling that through 
> script. (have to admit I didn't look very deep tough)
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to