Improving TableKit’s sort performance in IE7

I noticed that TableKit’s sort performance using IE7 grew progressively worse as tables grew in size (rows, not columns). I found the source of the problem and put in a simple fix to it. With the below change, sorting in IE7 is nearly as fast as in Firefox — that is, nearly instantaneous.

At line 322 (TableKit 1.2.1), comment the line as shown, and add the line noted.

        var tb = table.tBodies[0];
        var tkr = TableKit.Rows;
        rows.each(function(r,i) {
            tb.appendChild(r);
            //tkr.addStripeClass(table,r,i); /* THIS LINE COMMENTED */
        });
        TableKit.Rows.stripe(table); /* THIS LINE ADDED */ 

The change shouldn’t break anything as the new code added is standard TableKit code.

Bookmark and Share

Popularity: 21% [?]

Related Posts

Free market competition, unfettered by unnecessary governmental regulatory restraints, is the best way to foster innovation and development of the Internet. Free market competition drives scarce resources to their fullest and most efficient use, spurring businesses to invest in and sell as efficiently as possible the kinds and quality of goods and services that consumers desire. ast experience has demonstrated that, absent actual market failure, the operation of a free market is a far superior alternative to regulatory restraints.

-- Department of Justice

Post a Comment

Your email is never published nor shared. Required fields are marked *