|
From: <jgr...@us...> - 2003-10-28 00:16:20
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv24638/Classifier
Modified Files:
Bayes.pm
Log Message:
Added bayes_db_cache_size parameter with default of 65536 to improve performance for some users
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.214
retrieving revision 1.215
diff -C2 -d -r1.214 -r1.215
*** Bayes.pm 20 Oct 2003 12:53:50 -0000 1.214
--- Bayes.pm 27 Oct 2003 21:33:05 -0000 1.215
***************
*** 216,219 ****
--- 216,223 ----
$self->config_( 'hostname', $self->{hostname__} );
+ # The default size for the BerkeleyDB cache
+
+ $self->config_( 'db_cache_size', 65536 );
+
# We want to hear about classification events so that we can
# update statistics
***************
*** 574,579 ****
$self->{db__}{$bucket} = tie %{$self->{matrix__}{$bucket}}, "BerkeleyDB::Hash", # PROFILE BLOCK START
! -Filename => $self->config_( 'corpus' ) . "/$bucket/table.db",
! -Flags => DB_CREATE; # PROFILE BLOCK STOP
if ( !defined( $self->{matrix__}{$bucket}{__POPFILE__TOTAL__} ) ) {
--- 578,584 ----
$self->{db__}{$bucket} = tie %{$self->{matrix__}{$bucket}}, "BerkeleyDB::Hash", # PROFILE BLOCK START
! -Cachesize => $self->config_( 'db_cache_size' ),
! -Filename => $self->config_( 'corpus' ) . "/$bucket/table.db",
! -Flags => DB_CREATE; # PROFILE BLOCK STOP
if ( !defined( $self->{matrix__}{$bucket}{__POPFILE__TOTAL__} ) ) {
***************
*** 865,869 ****
# Helper the determines if a specific string matches a certain magnet type in a bucket
#
! # $noattype The string to match
# $bucket The bucket to check
# $type The magnet type to check
--- 870,874 ----
# Helper the determines if a specific string matches a certain magnet type in a bucket
#
! # $match The string to match
# $bucket The bucket to check
# $type The magnet type to check
|