GWT 鼠标悬停性能
我正在 GWT 中编写一个应用程序。一切都很顺利,直到我在 IE 中运行它。
我制作了一个使用 FlexTable 的应用程序,并且表格的每个单元格都将突出显示。我编写了 MouseOver 处理程序,但在 Internet Explorer 中它的运行速度非常慢。
我能做些什么吗?
I'm writing an application in GWT. It went really well, until I ran it in IE.
I made an application that uses a FlexTable, and each cell of the table was to be highlighted. I wrote the MouseOver handler, but in the Internet Explorer it works incredibly slow.
Is there anything I can do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FlexTable
在 IE 中的性能有点糟糕(顺便说一句,您使用的是哪个版本的 GWT?),因为创建表需要 DOM 方法。不过,Grid
应该可以为您带来性能上的良好提升,如果您的表格大小是恒定的并且事先已知,并且您不需要锯齿状表格(否则你甚至不能使用它:))。两者之间的折衷方案是 GWT 孵化器 - 例如
ScrollTable
直接支持鼠标悬停和 BulkTableRenderers< /a> 应该可以加快表的创建速度(甚至还有FlexTable
的版本)。即使您对在生产中使用它们不感兴趣,也可能值得检查一下,例如,它们如何在 IE 上实现 MouseOver 事件。FlexTable
's performance kinda sucks in IE (BTW, which version of GWT are you using?), because of the DOM methods needed there to create the table. However,Grid
should provide you with a nice boost in performance, if the size of your table is constant and known beforehand and you don't need jagged tables (otherwise you can't even use it :)).A compromise between the two would be one of the tables from GWT's Incubator - for example
ScrollTable
has support for mouseovers straight out of the box and BulkTableRenderers should speed up the creation of your table (there's even a version forFlexTable
). Even if you are not interested in using them in production, it might be worth checking out, for example, how they implemented MouseOver events on IE.