@@ -, +, @@ database via DBIx is not fast enough --- C4/Context.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/C4/Context.pm +++ a/C4/Context.pm @@ -526,9 +526,13 @@ sub preference { : undef; return $cached_var if defined $cached_var; - my $syspref; - eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; - my $value = $syspref ? $syspref->value() : undef; + # DBIx variant temporarily disabled due to performance issues + # my $syspref; + # eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; + # my $value = $syspref ? $syspref->value() : undef; + my $dbh = C4::Context->dbh; + my $query = 'SELECT value FROM systempreferences WHERE variable = ? LIMIT 1'; + my $value = $dbh->selectrow_array($query, {}, $var); if ( $use_syspref_cache ) { $syspref_cache->set_in_cache("syspref_$var", $value); --