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
- general
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 |
-- |
Status: |
iso-8859-15 |
<<Image(Root.png)>> |
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.
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
- Priority:
- Assigned to:
- Status: tagging this as no bug as the JS runtime is rather minor compared to the page load time. Obviously, huge tables take time to load and I don't think this is news. If someone likes to reopen this, provide much more detail about what you think is wrong and how it could get improved.