-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Description
Here is a sample script which accesses a DataRow
var ds = server.ExecuteDataSet(context.connectionString, context.queryText, context);
var dt = ds.Tables(0);
var drs = dt.Rows;
for(var i = 0; i < drs.Count; i++) {
var dr = drs(i);
var value = dr(0);
logger.LogMessage(MessageType.Information, value, "");
}
The line value = dr(0) cause OperationCanceledException which is caught internally. However, this causes a big performance issue in the loop. The issue is in TypeHelpers.cs in the source code of ClearScript:
if (argIndex >= args.Length)
{
if (!param.IsOptional && !param.HasDefaultValue)
{
throw new OperationCanceledException();
}
continue;
}
The same issue does not occur in 7.3.1.