htmlperformancehtml-tablefirefox-3

Firefox 3.5 "hangs" when rendering TABLE


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>

Solution

  • 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 set Browser.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!