Hi Isomorphic,
I just noticed that we are running unnecessary COUNT(*) queries for a long time now.
Please see this testcase, where dsListGridNoPL is what we have now.
Because of the use of sortByGroupFirst:true the result is thrown away client-side and data re-requested, once the result has more than 1000 records.
So either we have below 1000 records or new data is requested.
In this case the COUNT(*) is useless.
This opens two enhancements:
Generally speaking I have almost everywhere used progressiveLoading:false, as it is the default and results in a nice UI (perfect fitting scroll bar). But it is also very expansive if you have complicated fetches, so it might be a good idea to change the default to false, at least for me. If you don't want to change the default which I assume, I do think that a huge notice in the QuickStartGuide might be a good thing here, because it will make applications created with the framework faster.
Best regards
Blama
I just noticed that we are running unnecessary COUNT(*) queries for a long time now.
Please see this testcase, where dsListGridNoPL is what we have now.
Because of the use of sortByGroupFirst:true the result is thrown away client-side and data re-requested, once the result has more than 1000 records.
So either we have below 1000 records or new data is requested.
In this case the COUNT(*) is useless.
This opens two enhancements:
- maxAcceptedRecords (defaults to groupByMaxRecords): If the count returns more than this number, the normal query is not executed, the client informed about the situation and the ListGrid will automatically request again ungrouped (this requires a new attribute in your request flow and potentially bigger changes to ListGrid, so you might dislike this idea)
- when a group LG is using sortByGroupFirst:true, automatically set progressiveLoading:true
Code:
isc.ListGrid.create({ ID:"dsListGridPL", width: "100%", height: 300, minFieldWidth:80, autoFetchData: true, dataSource: "supplyItem", groupByField: 'units', sortByGroupFirst: true, sortField: "SKU", showFilterEditor: true, progressiveLoading:true, groupByMaxRecords: 1000 }); isc.ListGrid.create({ ID:"dsListGridNoPL", width: "100%", height: 300, top: 310, minFieldWidth:80, autoFetchData: true, dataSource: "supplyItem", groupByField: 'units', sortByGroupFirst: true, sortField: "SKU", showFilterEditor: true, groupByMaxRecords: 1000 });
Best regards
Blama
Comment