]> 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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Sep 2022 18:30:42 +0000 (15:30 -0300)
commit223d9d3a99903cff3d8a3078e6921da79099375c
treef4ab3c7ff71d23c056265dba1b3d668240509199
parent5c2b2ac09a0cabbab9333bc0cab90cf1880de17f
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>
Koha/UI/Table/Builder/Items.pm