overdue performance restored (INCOMPLETE FIX)
authorPaul Poulain <paul.poulain@biblibre.com>
Mon, 9 Nov 2009 14:44:14 +0000 (15:44 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 10 Nov 2009 21:23:49 +0000 (22:23 +0100)
commit943aa38564c7322fcc3534625cf05e1ba3f09d53
tree33b389dfbdef036d85e01d3818b9a03e2338379d
parent35fc57ae39d9e52c7abc6a2009aee3b8c7b7833b
overdue performance restored  (INCOMPLETE FIX)

The performances of this script felt back. Investigating, it's due to the extended attribute filtering improvement
when there are ext attributes, the script does a:
SELECT borrowernumber AS bn, b.code, attribute AS val, category AS avcategory, lib AS avdescription
        FROM borrower_attributes b
        JOIN borrower_attribute_types bt ON (b.code = bt.code)
        LEFT JOIN authorised_values a ON (a.category = bt.authorised_value_category AND a.authorised_value = b.attribute)

that returns a LOT of datas when you have 10 000 patrons and 5 attributes.
That results in the page needing something like 10 seconds to be loaded.
There are some other caveats. I've commented a few lines that remove the extended attr option. The best solution would be to fix it better, but I can't find how to do that now.

(note : i also have commented some lines that are unused)
circ/overdue.pl