Bug 16221: Use Storable::dclone() instead of Clone::clone() for L1 cache deep-copying...
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Thu, 7 Apr 2016 08:26:31 +0000 (10:26 +0200)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 23 Jun 2016 07:26:04 +0000 (09:26 +0200)
commitd64d83732efb32b1c473442abbd1d0284a7f298c
tree764669c3d091099d55dca54abe6643e83ea3f1aa
parent9208f251198be56db5083d1ab022d5bde1cf59bd
Bug 16221: Use Storable::dclone() instead of Clone::clone() for L1 cache deep-copying mode

Storable dclone() is over 3x faster then Clone::clone() when used for
creating a deep copies of the big, complex data structures like MARC
frameworks. See also Bug 16044 comments #18 & #20.

This is a trivial version of Bug 16166. Performance test
results (see Bug 16140 comment #23 for test setup description):

   master
   146.29 (14.64+14.53+14.51+14.57+14.72+14.56+14.53+15.06+14.56+14.61)

   master + Bug 16221
   96.5 (9.77+9.63+9.77+9.77+9.68+9.05+9.68+9.83+9.63+9.69)

   master + Bug 16166
   90.7 (9.15+9.10+9.16+8.41+9.19+9.19+9.11+9.19+9.02+9.18)

Bug 16166 is a bit faster and more comprehensive implementation, but
also more complex and harder to test/evaluate.

Test plan:

1) apply patch
2) profile GetMarcStructure() calls before / after patch, e.g. by
running some script which calls it often (like catalogue search
w/ XSLT processing turned on, etc.)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0c6f23a6ce45183c6396925f6018ec31090ed2cb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Koha/Cache.pm