GWT& IE8 导致表格行为非常滞后

发布于 2024-09-24 03:02:08 字数 662 浏览 0 评论 0原文

我还有一个问题。我正在使用 GWT 2.0.4 和 IE8 以及 FireFox(后者仅用于比较目的)。我的应用程序需要加载数据并将其显示在表格中。大约有 60 列和 150 行要显示。

由于加载是动态的 - 一旦获取了数据集,它就会添加到表中 - 我可以接受加载过程中的减速。但是:当表格完全加载时,我希望它会非常快并且让我滚动它而不会出现太多延迟。

虽然加载的表格在 FireFox 中的反应非常好 - 它保持非常灵敏 - Internet Explorer 8 却让我很头疼。特别是:一旦表格加载完毕,我尝试滚动或突出显示一行,IE8 就会变得非常滞后,突出显示一行会使 IE8 消耗 50% 以上的 CPU 功率。

我没有使用任何第三方库,甚至在 FlexTable 中显示空单元格仍然给我带来同样的问题。

我在这里发现了一些可能相关的问题: SmartGWT ListGrid 很慢,但是仅在 Internet Explorer 中。不幸的是,那里的问题和提供的 SmartGWT 链接都没有解决我的问题,因为我没有使用 SmartGWT。我确实相信这个问题是相关的。

我很乐意尝试任何建议。

I've yet another question. I'm working with GWT 2.0.4 and IE8 as well as FireFox (the latter only for comparison purpose). My application needs to load data and show it inside a table. There are about 60 columns and 150 rows to show.

Since the loading is dynamic - as soon as a dataset has been fetched, it's added to the table - I'm fine with slowdowns during loading process. However: when the table is completely loaded, I'd expect it to be pretty snappy and let me scroll it without much lag.

While the loaded table reacts in FireFox pretty good - it stays very responsive - Internet Explorer 8 is causing me a lot of headaches. In particular: as soon as the table finished loading and I try to scroll around or highlight a row, IE8 becomes VERY laggy and highlighting a row makes IE8 consume 50+% of CPU power.

I am not using any 3rd-party libraries and even displaying empty cells in a FlexTable still gives me the same issue.

I found some probably related issue here: SmartGWT ListGrid is slow, but only in Internet Explorer . Unfortunately neither the issue there, nor the supplied links for SmartGWT solved my problem as I am not using SmartGWT. I do believe though that the problem is related.

I'd be happy to try any suggestions.

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

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

发布评论

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

评论(2

聽兲甴掵 2024-10-01 03:02:08

如果可能(并且您对问题的描述表明如此),请使用 Grid 改为:

一个矩形网格,可以包含
文本、html 或其中的子 Widget
它的细胞。 必须调整大小
明确地达到所需的数量
行和列。

查看批量表格渲染器 @ GWT Incubator 进行比较方法(它有点过时,但是 FlexTable 比 Grid 慢的观点仍然成立;))。来自孵化器的“批量渲染”表也是一种选择,但是请记住,这些小部件可能不再被维护(例如,包含错误) - 或者被快速维护:D 但至少查看源代码如果您想推出自己的解决方案来解决这个问题,请为您指明正确的方向。

If it's possible (and your description of the problem suggests so), use Grid instead:

A rectangular grid that can contain
text, html, or a child Widget within
its cells. It must be resized
explicitly to the desired number of
rows and columns.

Have a look at bulk table renderers @ GWT Incubator for a comparison of these approaches (it's a little dated, but the point that FlexTable is slower than Grid still holds ;)). The "bulk rendered" tables from the incubator are also an option, however keep in mind that those widgets might not be maintained any more (and for example, contain bugs) - or are rapidly maintained :D But looking at the source might at least point you in the right direction, if you wanted to roll out your own solution to this problem.

定格我的天空 2024-10-01 03:02:08

突出显示一行会使 IE8 消耗 50+% 的 CPU 资源。

也许是因为您向表中的每一行添加了鼠标侦听器。如果是这样,您可以在 css 文件中使用 :hover-pseudo-class 。

如果您需要处理表中一堆小部件的事件,本文可能会有所帮助:http://code.google.com/intl/en/webtoolkit/doc/latest/FAQ_UI.html#As_the_application_grows,_event_handlers_seem_to_fire_more_slowl

highlighting a row makes IE8 consume 50+% of CPU power.

Maybe it's because you added mouse listeners to every row in your table. If so you could use :hover-pseudo-class in your css-files.

This article maybe helpful if you need to handle Events from a bunch of widgets in your table: http://code.google.com/intl/en/webtoolkit/doc/latest/FAQ_UI.html#As_the_application_grows,_event_handlers_seem_to_fire_more_slowl

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