跟踪滚动并管理 EditorTreeGrid 中的海量数据

发布于 2024-10-05 05:15:25 字数 616 浏览 1 评论 0原文

我们有一个要求,需要在两个单独的编辑器树网格中加载大约 4000 条记录,并在使用每棵树中特定列的值进行比较后突出显示每条记录中的差异。记录数量有限时一切都很好,但当记录数量达到 4000 或更多时,数据就会出现巨大问题。树网格的渲染大约需要 10 分钟,因为它包括展开所有节点、计算构建父子关系,然后突出显示。

我考虑的一个解决方案是尝试与 Live Grid 类似的方法,但对于突出显示逻辑,我们需要所有记录,因为网格“A”中的第三条记录可能与网格“B”中的第 115 条记录匹配。Live Grid 不会有以前的选择当它带来下一组记录时。

考虑到上述情况,实现这一目标的最佳方法是什么?当我向下滚动时,我可以继续向商店添加新记录吗?我认为可以通过跟踪滚动位置而不使用实时网格来完成,但我不确定如何实现这一点。我什至不确定这是否是正确的方法。有人可以为我提供一些示例代码,以便在用户到达 EditorTreeGrid 中垂直滚动的末尾时将元素添加到商店,或者建议更好的方法来实现此目的吗?我尝试添加滚动侦听器和侦听器,但不知何故没有启动。

另外,Live Grid 使用 List Store 而我使用 EditorTreeGrid 。如何有效地将其填充到树存储中?我以前曾经做过 getAllModels 并将它们填充到 TreeStore 中。这是正确的方法吗?

We have a requirement in which we need to load around 4000 records in two separate editor tree grids and highlight the differences in each record after doing comparison using values from a particular column in each tree . Everything's fine with a limited number of records but when we go up to 4000 records or more we have huge issues with the data. The tree grid takes around 10 minutes to render as it includes expanding all nodes, calculations to construct the parent child relation and then the highlight.

One solution I considered was trying a similar approach to Live Grid but for the highlighting logic we need all the records as the third record in Grid 'A' may match the 115th record in Grid 'B'.Live Grid would not have the previous selections when it brings the next set of records.

Considering the above, what would be the best way of achieving this? Can I just keep adding new records to the store as I scroll down ? I think it could be done by tracking the scroll position without using the Live Grid but am not sure how to achieve this. I'm not even sure if it's the right approach . Could anybody provide me some sample code to add elements to the store when user reaches the end of vertical scroll in EditorTreeGrid or suggest a better way to achieve this? My trial to add a scroll listener and a listener somehow doesn't kick in .

Also, the Live Grid uses List Store whereas I use the EditorTreeGrid . How do I effectively populate it to a tree store? I used to do getAllModels before and populate them into the TreeStore . Is it the right way to do this ?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小姐丶请自重 2024-10-12 05:15:30

最后我们放弃了 Tree 结构并重写了 LiveGrid 和 LiveGridView 来实现这一点。 LiveGrid 不会将完整数据加载到 UI,而是跟踪滚动并根据需要引入数据。

In the end we ended up dumping the Tree structure and overrode the LiveGrid and LiveGridView to achieve this . LiveGrid does not load the complete data to the UI but tracks the scroll and brings in data on need basis.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文