]> git.koha-community.org Git - koha.git/commit
@renew_failed can cause enormous performance-killing array.
authorJoe Atzberger <joe.atzberger@liblime.com>
Thu, 14 May 2009 20:28:40 +0000 (15:28 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 15 May 2009 00:32:58 +0000 (19:32 -0500)
commite0da51293995ef447b3e1e69b40cc551e0a39119
tree0d4ab893c7119dff74f660d6b8cef94dd03864a9
parentc25ddfab7915a1f6b32556a7a6d34d786f2baefa
@renew_failed can cause enormous performance-killing array.

The array was populated and values flagged with an accessor, like:
    for (@failedrenews) { $renew_failed[$_] = 1; }
But this means that an array of possibly hundreds of thousands of elements
would have to be auto-populated for high itemnumbers.  A hash is the correct
structure.  We also haven't checked the user input for validity, so we do not know
for sure that @failedrenews really does contain just itemnumbers.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
circ/circulation.pl