在什么时候开始使用虚拟化来渲染数据有意义?

发布于 2025-01-26 16:09:47 字数 463 浏览 4 评论 0原文

我正在使用React来构建一个简单的网站,我经常听到人们说他们使用虚拟化来渲染项目列表(例如,零售网站上的产品)。当我问他们为什么使用它时,他们说他们可以更有效地呈现大量清单。

当我问他们“大”的含义,而在什么时候列表变得“大”足以证明使用Virtualiaztion是合理的,没有人有答案。我搜索了基准测试,但找不到任何令人信服的东西。

假设有人想知道是否使用虚拟化库(例如 react-window 或< =“ https://github.com/bvaughn/reaeact-virtualized” rel =“ nofollow noreferrer”> react-virtualizatized ),列表需要多大,以便开始使用这种使用有意义图书馆?

I'm using React to build a simple website and I often hear people say that they use virtualization to render lists of items (eg. products on a retail website). When I ask them why they use it they say that they can more efficiently render large lists.

Nobody has an answer when I ask them what "large" means and at what point a list becomes "large" enough to justify using virtualiaztion. I searched for benchmarks but couldn't find anything convincing.

Let's say someone wonders whether to use a virtualization library (eg. react-window or react-virtualized), how large does the list need to be so that it starts making sense to use such a library?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文