In low code app the page is going in timeout in order to fetch data
We have some code like this
public GQIPage GetNextPage(GetNextPageInputArgs args)
{
const int batchSize = 20;
var rows = new List<GQIRow>();
var serviceList = GetElements();
_logger.Information("SERVICE LIST -- " + serviceList.Count);
foreach (var service in serviceList)
{
_logger.Information("ServiceName - " + service.Name);
foreach (var childInfo in service.Children)
{
CreateElementRow(ref rows, childInfo, service.Name);
}
}
_logger.Information("ROWS Length -- " + rows.Count);
var batchedRows = new List<GQIRow>();
for (int i = 0; i < rows.Count; i += batchSize)
{
var batch = rows.Skip(i).Take(batchSize).ToArray();
batchedRows.AddRange(batch);
}
return new GQIPage(batchedRows.ToArray());
}
Which we tried to push in batches but still if there is much data the page goes on timeout while loading, any idea how we can achieve this so that page does not goes int timeout?