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)
committerJason Stephenson <jason@sigio.com>
Tue, 27 Jun 2017 13:52:42 +0000 (09:52 -0400)
commitd3448167ca277366bb839a402f8285f5f81d31e8
treebef3213d12fe4934a48cad0ced7c3370a4ff0efd
parent518023bd388dccf84bb48a2b34d91a1e9813d5d2
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>
Signed-off-by: Jason Stephenson <jason@sigio.com>
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