[Koha-bugs] [Bug 10462] Some optimizations in Z3950 search paving the way for enhancements
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jul 24 16:38:39 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10462
--- Comment #14 from Galen Charlton <gmcharlt at gmail.com> ---
(In reply to M. de Rooy from comment #13)
> Good question. The main reason was just optimization. I saw that we needed
> only six fields from the MARC record for a simple display, and
> TransformMarcToKoha is doing a transformation of the whole MARC record.
> The original code contains a call to TransformMarcToKoha followed by a call
> to ImportBreeding that again calls TransformMarcToKoha. Both calls have been
> optimized. 'Downside' is indeed a few lines hardcoding tags in the sub
> _add_rowdata.
> Let me still see a moment if we can still improve some there in order to
> gain more confidence :)
I suspected it would be something like that. Arguably that's at the level of
micro-optimization that could be dispensed with in the interests of keeping the
code general, but a possible middle ground that might speed things up would be
writing a routine like this:
$hashref = ExtractFieldsPerFrameWork($marcrecord, $arrayref_of_fields,
$frameworkcode);
e.g.
ExtractFieldsPerFrameWork($marcrecord, ['biblio.title', 'bibliitems.issn' ],
'');
returning
{
'biblio.title' => 'Journal of irreproducible results',
'biblioitems.issn' => '0022-2038',
}
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list