]> git.evergreen-ils.org Git - Evergreen.git/commit
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:59:00 +0000 (09:59 -0400)
commit7c8772f41be660c850ac77fcf0cce02920f560fb
treebb54b3619dfa91b9e2cc555878b1a72eea9f14f6
parent8c54a9fddf2c30bc9a915c2d147f8cb60ea587a5
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