Description

I have some pages with very large tables e.g. 3782 lines. The common.js code seems to slow down the loading of the pagedata and often I get a failure in line 554 or line 620 of common.js shown. I get a dialog asking me to stop the script too.

Because that feature doesn't find the right lines in tables it just should not try what it does with tables.

/!\ what does it "do with tables"? what do you suggest?

Steps to reproduce

Example

Component selection

Details

MoinMoin Version

1.9.3pre

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

I reverted common.js to 1.9.2

Discussion

Currently I think it should skip tables.


I tried to reproduce this by duplicating rows of your table until I had a table of >4000 lines. The table I used starts like this:

Titel / Url

letzte Ă„nderung

Aktion

Encoding

Vorschau

Links

Root

--

Status:

iso-8859-15

<<Image(Root.png)>>

html
meta
wiki
images

Then I modified runScrollTextareaInitOnce in common.js to collect some times:

function runScrollTextareaInitOnce() {
    // uncomment next line to test - most browsers will display this alert twice 
    //~ alert('scrollTextareaInitComplete=' + scrollTextareaInitComplete);
    if (scrollTextareaInitComplete) {
        return;
    }
    scrollTextareaInitComplete = 1;
    var startTime = new Date();
    scrollTextareaInit();
    var endTime = new Date();
    var sHours = startTime.getHours();
    var sMinutes = startTime.getMinutes();
    var sSeconds = startTime.getSeconds();
    var sMilliseconds = startTime.getMilliseconds();
    var eHours = endTime.getHours();
    var eMinutes = endTime.getMinutes();
    var eSeconds = endTime.getSeconds();
    var eMilliseconds = endTime.getMilliseconds();
    var tStart ='start H:M:S:ms=' + sHours + ':' + sMinutes + ':' + sSeconds + ':' + sMilliseconds;
    var tEnd = '  end H:M:S:ms=' + eHours + ':' + eMinutes + ':' + eSeconds + ':' + eMilliseconds;
    alert(tStart + tEnd);
}

Running on Windows 7 with different browsers resulted in the following. Times are in seconds. The page load times were calculated by starting the page load when the minute changed on my PC clock and using the time displayed by the alert as the end time.

Browser Page Load Time Javascript Time
Safari for Windows 33 .5
Iron (Chrome) 32 .9
Opera 31 1.1
Firefox 34 1.3
IE 8 83 17.4

When I double-click on a table row, the text area is positioned on/near the correct line. Can you give more environment details? Does your page have any duplicate ID warning messages? -- RogerHaase 2010-05-27 22:06:11

I got again the js error - i must say it does not happen all the time It tells marks [i+1] is null line 618 of js/common.js walkDom (mark, line, isPreview, marks[i+1].id, top.id);

On my example page on top I have an <<Include(/info)>> I have no idea yet if that may be involved. content of info is

{{{#!wiki yellow
Hallo
}}}

line 593: for (i = 0; i < marks.length-1; ++i) { that may make line 618 unhappy if i is the last element.

Looking closer at the page source I see that I have multiple times the same anchor used <<Anchor(I)>>

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/DoubleClickJSWithVeryLargeTables (last edited 2010-06-08 06:02:08 by ReimarBauer)