- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 67 Insurance
- 536.8K On-Premises Infrastructure
- 138.5K Analytics Software
- 38.6K Application Development Software
- 5.9K Cloud Platform
- 109.5K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.2K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
LimitFilter assumption if number returned < bufferSize
I have the following c# extend code that pages a result set. Is it safe to assume that if GetValues returns less values than the LimitFilter bufferCount, then
all data has been returned (subsequent nextPage and GetValues is not required to be called again)?
In the system, the first GetValues call returns 20 values in roughly one second.
Since 20 < 1000, we are assuming that there is nothing left to return, but this makes me slightly uneasy.
If Icomment out the code and no longer break out of the while loop at this point and call NextPage and then GetValues, The GetValues call takes roughly ten seconds
and returns no data.
So is this workaround safe ? Any advice on why this last call might be taking such time would also be appreciated.
var bufferCount = 1000;
var pagedFilter = new LimitFilter(allFilter, bufferCount);
var values = cache.GetValues(pagedFilter).ToList();
while (values.Count > 0)
// is this safe?
if (values.Count < bufferCount)
values = cache.GetValues(pagedFilter).ToList();