DO scripts hangs/chokes on something?

This might actually belong to the main support forum.

I use 11.13 x64.

It seems DO chokes/hangs when it calls a script for a larger number of items.
I have no idea exactly how many, but 31413 items is apparently always enough.

I enable flat view mixed no folders, followed by enabling the column.

Eventually it stops adding values from the script while the spinner keeps spinning, or as with this
script, it simply stops querying for values from the script.
The tooltip for the spinner says "Querying file and folder information..." when clicking on it.

Click the column and see if it has filled all of its items with "HELLO WORLD.TXT";

I don't know if it's relevant or not, but the testfolder(s) are on a disk attached to USB2.
In my case, the following script stops doing anything after 10112 (of 31413) items:

function OnInit(initData){
  initData.name = "DummyTest";
  initData.desc = "A testing column.";
  initData.copyright = "myarmor";
  initData.version="0.1";
  initData.min_version="11.8";
  initData.default_enable=true;
}

function OnAddColumns(addColData){
  var col;
  col=addColData.AddColumn();
  col.name = 'DummyTest';
  col.label = 'DummyTest';
  col.method = "OnDummyTest";
  col.autogroup= true;
  col.namerefresh=true;
  col.justify = "left";
}

function OnDummyTest(scriptColData){
  if (scriptColData.col!="DummyTest"){
    return;
  }
  scriptColData.value="HELLO WORLD.TXT";
}

I initially noticed this with the FilterName column, but after trying to narrow it down it seems the above is enough.

On another note, Script Output seems to be limited to 32K, and it seems that either because of number of items
or speed, the output can sometimes be spotty (sometimes writes the text, sometimes writes blanks or nothing).

The same happens in 11.13.1, even with the small script above.
The above script simply stops doing what it's supposed to.

In FilterName the same happens, but the spinner is spinning endlessly.
The column header is red if the tab is sorted on that that field.
When this happens I seem to remember it maxes a core.

The same happens whether it uses the "cache" or not.

I see that too! Got a flatview with approximately 4500 files, only 3000 of them get a column value, the rest of them stays blank and the blue circle continues to be busy. The column kind of finishes too early, as it sorts after a while, which is normally only the case, when there are have been values retrieved for all the items.

Thanks for reporting this!

We've found the problem and I think know what's causing it now. Look for a fix in the next update, hopefully.

Good to hear, thanks for looking into it! o)

Nice :slight_smile:

Todays test for this problem resulted in DO giving up after 12534 (of ~125000) "HELLO WORLD.TXT" items
in a flat view mixed/no folders (11.16 x64 on W7).

In the meantime, is there an efficient way (inside the eventhandler) to precount the number of items the column
is supposed to be shown for, then abort its execution and instead display a single message in the
column of the first item if it has too many items?

I mean, if it can't do what it is supposed to because of the number of items, then there's a chance the
column's data is "invalid".

Example:
If it is sorted on that column, and the column has only been executed on half..then the items aren't really sorted.
(the column title isn't always red when this problem occurs).

I don't think there is a good workaround at the moment.

I got sidetracked from fixing the problem originally, and it turned out to be much more complex than first thought, but it is back on our radar. I've been looking at it this week, coincidentally.

I think I'm still observing issues with this as well, but I did not a lot of mass script column value operations lately.
I notice though, that I tend to remove some script columns because of them not working as expected in everyday use. An error can always be in the belonging script of course, but I see a lot of spinning blue circles that don't stop even though I change directories or close tabs, which is suspicous at least.

Fixes for this are now done and will be part of the next beta.

Nice, I appreciate it :slight_smile:

I hope it can handle real (column) scripts, and not just the above test script.

I tested this again using the script above with 11.16.1, and it seems to work as
expected, at least based on my "random" clicking around, and it displayed the same
whether it was sorted A-Z/Z-A.

My test used the script above, but with 327538 files (on a USB2 drive) in a flat-view.
It did take considerable amount of time (10-30 minutes), but it eventually finished.

Thanks for testing & confirming the fix so fast! Glad it's working.