fix allow 2/more commands on a line
[spider.git] / perl / AnnTalk.pm
index ae3337f764e6b44d5aa5a2c54eeeaa33ce24e60f..71bd272f2736dc6e28642035f92a86311607260c 100644 (file)
@@ -16,6 +16,7 @@ use DXDebug;
 use DXDupe;
 use DXLog;
 use DXLogPrint;
+use Time::HiRes qw(gettimeofday tv_interval);
 
 use vars qw(%dup $duplth $dupage $filterdef);
 
@@ -40,15 +41,17 @@ $filterdef = bless ([
                          ['origin_state', 'nz', 14],
                   ], 'Filter::Cmd');
 
-our $maxcache = 30;
+our $maxcache = 130;
 our @anncache;
 
 sub init
 {
+       my $t0 = [gettimeofday];
+       dbg("AnnTalk: loading up to $maxcache announcements into cache");
        @anncache = DXLog::search(0, $maxcache, $main::systime, 'ann');
        shift @anncache while @anncache > $maxcache;
        my $l = @anncache;
-       dbg("AnnTalk: loaded last $l announcements into cache");
+       dbg("AnnTalk: loaded last $l announcements into cache in " . _diffms($t0) . "mS");
 }
 
 sub add_anncache