angularjs 从 json 文件中获取 ng-repeat 数据的速度非常慢 [英] angularjs very slow fetching ng-repeat data from a json file

查看:32
本文介绍了angularjs 从 json 文件中获取 ng-repeat 数据的速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 json 文件,其中包含大约 8000 个联系人,使用 ng-repeat 使用 angularjs 获取所有数据需要很长时间,有什么解决方法吗?

I have a json file which has about 8000 contacts in it, fetching all that data takes a very long time with angularjs using ng-repeat, is there any fix for this?

推荐答案

在检索如此大的记录时,您不能期望有多大的速度.您可以使用

You cannot expect much speed when retrieving such large records. You can optimize the ng-repeat performance by using

  1. 跟踪
  2. BindOnce
  3. 无限滚动

这些东西会在一定程度上提高性能.

These things will improve the performance to an extent.

这篇关于angularjs 从 json 文件中获取 ng-repeat 数据的速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆