Improve C4::Charset::MarcToUTF8Record performance
authorFrederic Demians <f.demians@tamil.fr>
Sat, 25 Oct 2008 08:38:37 +0000 (10:38 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 12 Nov 2008 16:11:09 +0000 (17:11 +0100)
commit76245635b8a172125fd2ea58ff77686e0f80c2e0
tree754d792fb13fb2cb35e885f507d2bea1a946c5c8
parent4f323d5b4f35425239bf0aa2830d9fd0550516ee
Improve C4::Charset::MarcToUTF8Record performance

A script like bulkmarkimport.pl spends most of the time
in C4::Charset::MarcToUTF8Record function, and
specifically in C4::Charset::char_decode5426
just initializing a hash. This patch moves this
hash outside function to avoid its initializing
each time the functon is called.

A test on a specific conversion script shows me
that performances were improved from 23s to 8s.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Charset.pm