From: imiyazaki Date: Mon, 26 Jan 2004 13:28:08 +0000 (+0000) Subject: add option flags to BerkeleyDB to improve performance. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=632594fb3ecbb57ff180dddce4c5cab1a321e482;p=chise%2Fperl.git add option flags to BerkeleyDB to improve performance. --- diff --git a/Chise_utils/Chise_utils.pm b/Chise_utils/Chise_utils.pm index b03cf0b..2afecc7 100644 --- a/Chise_utils/Chise_utils.pm +++ b/Chise_utils/Chise_utils.pm @@ -144,7 +144,7 @@ sub get_db{ if(defined($db{$atr}) and -f $db{$atr}){ tie %{$chardb{$atr}}, "BerkeleyDB::Hash", -Filename => $db{$atr}, - -Flags => DB_RDONLY; + -Flags => DB_RDONLY | DB_THREAD | DB_TXN_NOSYNC; }else{ return undef; } @@ -156,7 +156,7 @@ sub get_reverse_db{ if(defined($reverse_db{$atr}) and -f $reverse_db{$atr}){ tie %{$reverse_chardb{$atr}}, "BerkeleyDB::Hash", -Filename => $reverse_db{$atr}, - -Flags => DB_RDONLY; + -Flags => DB_RDONLY | DB_THREAD | DB_TXN_NOSYNC; }else{ return undef; }