LP 1208875: Fix circ history CSV download for many circulations.
authorJason Stephenson <jstephenson@mvlc.org>
Fri, 6 Jun 2014 20:07:11 +0000 (16:07 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 2 Jun 2017 14:07:52 +0000 (10:07 -0400)
commit1749f296d8eaaa5bf57f453f0d90e7c5e3cb49e3
tree4ea45dbb14105996fa8bb993807a6bf1fdf4c408
parentfc9b7ea11520aaf9f188e682daa9066d91870a1c
LP 1208875: Fix circ history CSV download for many circulations.

We no longer retrieve a user's circ history for download via
action/trigger and instead build the CSV data right in the TPAC.
The reason for this change is that action/trigger imposes just
too much of a delay between initiating the retrieval and getting
the data, particulary for patrons who have a large number of
circulation history entries, for certain values of large.

The new code uses the CStoreEditor to make JSON queries to retrieve
only the information needed for CSV.  Testing revealed that using
the existing fetch_user_circs method in EGCatLoader/Account.pm was
still too slow for the more extreme patrons.  The new code also
caches most of the retrieved bibliographic data.  Testing revealed
that most patrons get multiple checkouts of the same things, or
multiple parts of a multiple part television series.  Caching the
bib data for these records has shaved several seconds off retrieval
time in testing.

This branch makes use of a new, MVF, view when retrieving format
information.  It is thus unsuitable as-is for backport before
2.6.

Along the way, we have accreted a generically reusable CSV filter
for Template Toolkit.  That could be useful not only in other
parts of Evergreen, but in other projects.

Finally, this commit leaves the old action/trigger code in the
database.  Right now, it makes a good reference if anyone wants
to study what has been changed.  It can be removed later, if so
desired.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/MANIFEST
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/perlmods/lib/Template/Plugin/CSVFilter.pm [new file with mode: 0644]
Open-ILS/src/templates/opac/myopac/circ_history/export.tt2