]> git.koha-community.org Git - koha.git/commit
Bug 33745: Lazily create attribute accessor methods in AUTOLOAD
authorDavid Gustafsson <david.gustafsson@ub.gu.se>
Tue, 16 May 2023 11:42:55 +0000 (13:42 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 14 Jul 2023 18:23:23 +0000 (15:23 -0300)
commit837d0a955e3b3ebf66cc381911330f9476a4f2ff
treebdf2f5059856148a66a3a476fbfd86d5497e5375
parent8fac9067b2494cca29a2b2147b78366c6a53bcf6
Bug 33745: Lazily create attribute accessor methods in AUTOLOAD

Lazily create accessor methods when getting or setting an Koha::Object
attribute resulting in a significant speed up.

To test:
1) Run the benchmark.pl script
2) Apply the patch
3) Run the script again, Koha::Object accessors should be about 7 times faster
5) Ensure tests in t/db_dependent/Item.t still pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Object.pm