So from time to time, either delete the Files scripts - or merge them into one script *)
This will speed up the Concatenate step by orders of magnitude.
Even more important: if you trigger the Update manually:
With the new Preview Tab, the strange "processing" has to be done EVERY time again and again:
1) when the Concatenate menu opens
2) when tables are added via Add
3) after clicking on OK
This video illustrates the problem - to make it not extremely boring, I sped it up by reducing the for loop to 50:
*) almost surprising: the same content in the table scripts - but orders of magnitude faster:
dt1 = new table("test",<< add rows(1), new column ("x", set each value(1)));
t0=hptime();
Nmax=200;
for(i=1, i<100,i++,
filesN = As list(Index(1,Nmax)`);
filelist = transform each({i},filesN,Eval List({"myfile"||Char(i)||".txt", 1, 1}));
Eval (Eval Expr(
dt1 << New Table Script( "Files",Expr(filelist) )
)));
time=(hptime()-t0)/1000000;
print("add files info: ", time);
//merge the table scripts
merged Script = dt1 << get script();
dt1 << delete scripts(dt1 << Get Table Script Names);
Eval(eval Expr(dt1 << new table script ("merged",Expr(Name Expr(merged Script)))));
dt2 = dt1 << Subset( All rows, Selected columns only( 0 ) );
t0= hptime();
dt1 << Concatenate( dt2);
time=(hptime()-t0)/1000000;
print("concat 2 files - merged scripts: ", time);
vs before: