Description

Visting very large pages with IE causes the browser to hang / to freeze for quite some time (>>10 seconds).

Describe the bug...

Steps to reproduce

  1. Visit e.g. MoinAPI/Beispiele with IE7 or IE6

  2. Look what's happening: Although the page has been loaded, the browser hangs for quite some time.
  3. If the page has inline comments: click "Comments". The browser hangs again for quite some time.

Example

Component selection

Details

This wiki

Workaround

Discussion

Turning off Javascript speeds it up quite a lot. The browser doesn't hang anymore. I could not reproduce this behaviour on FF3 and Opera9.52 but I think I have seen some similar behaviour on FF2 (but I am not sure).

If you use a Javascript profiler (e.g Venkman) you will see that both functions (toggleComments, show_toggleComments) take quite a lot of time (compared to the other stuff). Instead of parsing all elements of the DOM-tree with

document.getElementsByTagName('*');
...
if ( el.className.indexOf('comment') >= 0 ){
...

it would be more efficient to search more specifically (and thus maybe much faster) with

var elements = document.getElementsByName("inline_comment");
for (j=0; j < elements.length; j++) {
...

But this is not tested.

Ok. I have now tested it. The proposed solution worked nicely and fast on Firefox and Opera, but not on IE. Reason: IE does not recognize name-attribs when given to span/div elements. Giving names to span/div elements is also not valid html. So there seems to be no cure for the described problem above.

see /ReferenceTime for some tests

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/LargePagesCauseIEToHang (last edited 2008-09-27 21:35:48 by OliverSiemoneit)