]> git.koha-community.org Git - koha.git/commit
Bug 31455: (QA follow-up) Make table creation O(N)
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Thu, 1 Sep 2022 19:45:25 +0000 (19:45 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 16 Sep 2022 15:21:55 +0000 (15:21 +0000)
commitb2a66cd3075b85a388272885048ba3248ce60500
tree4812e849d3d06b81ebad97c6356996917c742797
parentd8956d387d602da27c19020030b919605d8471e7
Bug 31455: (QA follow-up) Make table creation O(N)

We can insert the indices before the main loop to a hash,
this way we don't have to look up during each loop iteration
the index from an array which in the worst case might take O(N)
thus making the total time complexity O(N^2).

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 223d9d3a99903cff3d8a3078e6921da79099375c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/UI/Table/Builder/Items.pm