]> 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)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:35 +0000 (23:19 +0200)
commitd74210954296b166c94383d687ee72d465f16908
treee6981de86de22d33ee9124666b620552db52bda3
parentea3bd3ac1a1ac7c85319eed7b8f508b4ea67252b
@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