在异步模式中加载GridWeb数据
Contents
[
Hide
]
当创建一个包含大型数据集的工作簿或读取一个庞大的 Microsoft Excel 文件时,这必定会花费更多时间和资源。进程将占用的总内存始终是一个问题。可以采取措施来应对这一挑战。Aspose.Cells.GridWeb提供了一些相关选项和API以降低、减少和优化内存使用。此外,它可以帮助进程更高效、运行得更快。对于包含大型单元格数据的工作表,您可以异步加载数据集,这可以改进用户体验的总体性能。
使用GridWeb.EnableAsync选项来优化单元格数据的内存和性能。在构建大型数据集以供单元格使用时,当您将选项设置为真时,数据加载将基于当前可见的窗口区域。简而言之,当您在GridWeb的工作表中滚动单元格数据时,它将仅基于当前滚动位置加载新的窗口数据。
以下示例显示了如何启用GridWeb的异步模式。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
GridWeb1.EnableAsync = true; |