Bug #17074

Use count=none & keyset paging

Added by Peter Amstutz 11 months ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Workbench2
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-
Release relationship:
Auto

Description

Calculating "items_available" in list requests is expensive. If we use "count=none" then it will skip the count and results can be returned much faster.

Using "offset" for paging is also expensive, because it throws away results. Without knowing the total count, offset paging cannot provide a "navigate to last page" option, as it does not know how many pages there are. Offset paging also produces unexpected results if list order changes during navigation.

We want to make the following changes:

  1. all list requests use count=none unless there's some special reason it needs it (for example, displaying the total number of search results)
  2. paging is adjusted to use keyset paging. Results are ordered by [sort column, uuid] and the search query uses something like [sort column >= last seen, uuid > last seen].
  3. User can navigate to first page, last page, next page, previous page. User cannot navigate to an arbitrary page.
  4. The last seen sort column and uuid should be included in the query part of the URL in the URL bar so that someone can still copy and paste a logical link to the page.

History

#1 Updated by Peter Amstutz 11 months ago

  • Description updated (diff)

Also available in: Atom PDF