[Koha-patches] [PATCH] Caching for authorised values
Frédéric DEMIANS
f.demians at tamil.fr
Thu Jun 18 10:03:58 CEST 2009
> Incidentally, a function, a new one, seems to impact badly OPAC
> performances: C4::Biblio::GetCOinSBiblio. It takes 424ms. It wouldn't be
> hard to fix it. This function begin reading (re-reading) biblio record
> (GetMarcBiblio). And as we know reading biblio record implies parsing
> XML biblio record which is VERY slow. Solution 1: caching MARC::Record
> in GetMarcBiblio (Memoize). Solution 2: Calling GetCOinSBiblio with
> available MARC::Record object.
I'm about to send a patch for solution 2. This patch will disable COinS
on virtual shelves since having COinS here has a huge impact on
performances: for a large list, a lot of biblio records have to be read,
deserialized, which is CPU time consuming. A solution, would be to store
COinS in a new field of biblioitems table.
Without patch:
http://devel.tamil.fr/nytprof-normal/C4-Biblio-pm-line.html#1042
423ms
With patch:
http://devel.tamil.fr/nytprof-coins/C4-Biblio-pm-line.html#1042
28ms
It's better but not perfect. Obviously MARC::Record->subfield take A LOT
of time. So, now MARC library has to be profiled and improved :-) or
rewrite in C language...
--
Frédéric DEMIANS
http://www.tamil.fr/u/fdemians.html
More information about the Koha-patches
mailing list