Firefox 3.5“挂起”渲染 TABLE 时
我有一个简单的 HTML 表(10 列 x 500 行)。当页面加载时,我开始向下滚动,浏览器挂起,并且不允许我滚动 3-5 秒。这通常发生在第 75-100 行附近。有时我必须一直滚动到底部,然后开始向上滚动到顶部。不管怎样,我很少没有经历过这种行为。
我在 IE、Safari 和 Firefox 2 中都试过了,绝对没有问题。我知道这不是由于服务器端处理、网络延迟或客户端脚本造成的。我尝试将 CSS 表布局设置为“固定”,但没有明显结果。表格单元格的内容是纯文本,没有图像等。
我相信这是 Firefox 3.x 中引入的性能问题。有谁知道修复程序(不,降级到 Firefox 2,或使用分页等不是一个选项)?
这是我的 HTML(我的使用 JSP 来构建表)。
<html>
<head>
<title>Firefox 3.x Table Rendering Performance Issue</title>
</head>
<body>
<table style="table-layout:fixed;">
<tbody>
<% for (int r=0; r<500; r++) { %>
<tr><% for (int c=0; c<10; c++) { %><td><%=r%>-<%=c%></td><% } %></tr>
<% } %>
</tbody>
</table>
</body>
</html>
I have a simple HTML Table (10 columns x 500 rows). When the page loads I start to scroll down and the browser hangs, and won't allow me to scroll for 3-5 seconds. This usually happens around row 75-100. Sometimes I have to scroll all the way to the bottom, and start scrolling back up to the top. Either way, it is rare that I don't experience this behavior at all.
I have tried this in IE, Safari and Firefox 2, all have absolutely no problem. I know it is not due to server-side processing, network latency, or client-side script. I have tried setting CSS table-layout to "fixed" with no apparent result. The content of the table's cells are plain text, no images, etc.
I am left to believe it is a performance issue introduced in Firefox 3.x. Does anyone know of a fix (and no, downgrading to Firefox 2, or using pagination, etc. is not an option)?
Here is the HTML I have (mine uses JSP to build table).
<html>
<head>
<title>Firefox 3.x Table Rendering Performance Issue</title>
</head>
<body>
<table style="table-layout:fixed;">
<tbody>
<% for (int r=0; r<500; r++) { %>
<tr><% for (int c=0; c<10; c++) { %><td><%=r%>-<%=c%></td><% } %></tr>
<% } %>
</tbody>
</table>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 Chetan Sastry 指出的那样,这与已知错误 在 Bugzilla 中列出。
显然,这是由于保存会话数据期间的深度回归造成的。 解决方法是转至
about:config 禁用会话数据的保存
并将
Browser.sessionstore.privacy_level
设置为 2(这意味着不会保存会话数据)。为了使这个与编程相关:您可以考虑与 Mozilla 工作人员合作来解决这个问题!
As Chetan Sastry notes, this is consistent with a known bug, listed in Bugzilla.
Apparently, this is due to deep regression during saving of session data. The workaround is to disable saving of session data by going to
about:config
and setBrowser.sessionstore.privacy_level
to 2 (which means no session data will be saved).To make this programming-related: you might consider working with the Mozilla crew to fix this!