[Koha-bugs] [Bug 16365] Selectively introduce GetMarcStructure() "unsafe" variant for better performance

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 27 13:04:56 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16365

--- Comment #8 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Jacek Ablewicz from comment #5)
> (In reply to Marcel de Rooy from comment #4)
> > btw this would effectively make your patch a oneliner: just add unsafe in
> > GetMarcStructure ?
> 
> You mean that with this patch all GetMarcStructure() calls remaining in the
> code (including the call in PrepareItemrecordDisplay()) will be 'unsafe =>
> 1' ones?
> 
> Hm, it's possible - it's been a while since I reviewed those calls, and I
> was only having a closer look at those of them that were called repeatedly.
> Also in the meantime there was hopefully some progress with eliminating
> unneeded / most offending ones in the other bug reports. I'll need to have a
> look..

Hm, in a way - yes, with the PrepareItemrecordDisplay() sorted out, there are
hardly any "safe" calls left in the modules (only one in C4/Acquisition.pm ?).
There is a bunch of them left in the scripts though. I skipped "safety audit"
for the scripts (only checked that there are no repeated direct calls in
there).

Right now, if the given script calls GetMarcStructure() only once, and it's
doing it directly, adding 'unsafe' flag globally (i.e. oneliner variant) would
not benefit this script speed-wise (script starts with empty L1 cache and for
the 1st call it needs to fetch a framework structure from L2 anyway).

If any of those scripts is fetching the same framework 2nd+ time indirectly
(via some functions from the modules), with the oneliner there would be a small
speed benefit (10-15 msec), but now there is a possibility that direct
(unaudited) unsafe call will interfere with the further unsafe (audited)
indirect call and vice versa. This is purely theoretical, I have no idea if
there may really be such problems in some of those scripts or not - I didn't
checked, remember that by design this patch is an limited, lazy approach ;)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list