改进 IE11 中的 Angular Material 性能 [英] Improve Angular Material performance in IE11

查看:28
本文介绍了改进 IE11 中的 Angular Material 性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Angular Material 来可视化来自 SQL Server 数据库的数据.垫表是根据我返回的列和条目的数量动态创建的.可以有 40、50+ 列和 100k+ 个条目.

I'm using Angular Material to visualize data from a SQL Server database. The mat table is create dynamically depending on how many columns and entries I get back. There can be 40, 50+ columns and 100k+ entries.

我选择只显示少数列,并通过显示更多按钮显示所有列.分页器默认将行数限制为 100,但最多可以显示 2.000.

I made the option to show only a handful of columns and via a show more button show all columns. And the paginator limits the rows to 100 by default but can show up to 2.000.

虽然它在 Firefox 和 Chrome 上运行相当流畅,但排序 100k+ 行或一次渲染 1.000 或 2.000 行可能需要一些时间,但在 IE11 上的性能非常糟糕.即使只显示标准的 100 个条目和少数行也需要一些时间,切换到所有列和/或更多行的速度非常缓慢,而且 IE 会完全冻结.

While it runs fairly smooth on Firefox and Chrome, though sorting 100k+ rows or rendering 1.000 or 2.000 rows at once may take a moment, the performance is pretty bad on IE11. Even just showing the standard 100 entries and handful of rows takes some time, switching to all columns and / or more rows is painfully slow and somethings the IE just freezes completely.

我做了一个简单的演示来展示它是如何工作的.mat-table 和我用的一样.

I made a little simplified demo to show how it works. The mat-table is just like the one I use.

你知道有什么方法可以提高 IE11 的性能吗?

Do you know any way to improve the performance on IE11?

演示

推荐答案

这不是库本身的性能问题,而是浏览器的性能问题.请查看以下链接,它是对浏览器中 CSS3 布局结构的性能测试.

This is not a performance issue with the library per se, but rather the browser. Please review the following link, it is a performance test for CSS3 layout constructs in browsers.

在 Chrome 中运行链接,然后在 IE11 中使用相同的设置和您很快就会看到 IE11 的局限性.

Run the link in Chrome, then run it in IE11 with the same settings and you will quickly see the limitations of IE11.

https://testdrive-archive.azurewebsites.net/Performance/MazeSolver/

这就是 Edge 在 Chromium 上重建的原因

This is why Edge is being rebuilt on Chromium

https://www.wired.com/故事/microsoft-edge-browser-chromium-internet-explorer/

除此之外,您还需要探索服务器端分页,并控制通过线路传输的数据子集大小,以便在处理此类数据时获得进一步的性能.

Beyond this, you will need to explore server side pagination, and control of the data subset size transmitted across the wire to gain further performance when working with that kind of data.

这篇关于改进 IE11 中的 Angular Material 性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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