TPac: Paging needed for holds

Bug #1000324 reported by Thomas Berezansky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

While it is impressive that TPac can load 3598 holds for a patron on a less than stellar VM I suspect that showing all of them on one page is less than ideal. Especially as it took several minutes to load the page.

Thus I think TPac needs paging for holds, showing maybe up to 50 at once for speed purposes.

Note that while 3598 holds is a tad excessive for real-world purposes, I have run into patrons with over 300 holds (most suspended, but still there).

Tags: pullrequest
Revision history for this message
Mike Rylander (mrylander) wrote :

Instead of paging, how about a simple cut-off number (say, 100), and if we see that many we assume there are more and display a Show All link at the bottom of the list. That should greatly simplify the code, since paging is more complicated than a switch that enables or disables a LIMIT clause.

Revision history for this message
Thomas Berezansky (tsbere) wrote :

I think the LIMIT clause might actually be harder to code in then paging, if implemented in that manner.

Unless I am reading the code wrong, it looks like TPac currently requests an ordered ID List, then fetches holds from that list in batches (looks like of 8 currently). Which means that it already has access to the total number of holds in an ordered fashion.

The ID List appears to return fairly quickly, the fetching details is (I believe) the bottleneck.

Thus while a limit of 100 to start with could likely be implemented fairly quickly and easily (with knowledge of how many holds there are already there), I think paging could be implemented fairly easily as well by setting the batch index to the first hold of the "page" and adding in a max counter.

Having seen what the code already looks like I might take a shot at it myself.

Revision history for this message
Thomas Berezansky (tsbere) wrote :
tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.3.0-alpha2
Changed in evergreen:
milestone: 2.3.0-alpha2 → 2.3.0-beta1
Changed in evergreen:
importance: Undecided → Wishlist
milestone: 2.3.0-beta1 → none
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

This totally works.

Pushed to master. It's a new feature, so I guess I ought to stop there. Thanks Thomas.

Changed in evergreen:
milestone: none → 2.4.0-alpha
status: New → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.