about summary refs log tree commit homepage
path: root/t/search.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-23 08:38:48 +0000
committerEric Wong <e@80x24.org>2020-12-23 23:46:40 +0000
commit4a2e89007cb7b62151cb1869e49b27ebacfc27eb (patch)
tree91b6825adb045aa1d295dddf6ef1029683fac47a /t/search.t
parent361cdfd0ae67d52d8a589b4ddc6e7fa94d8a9c8d (diff)
downloadpublic-inbox-4a2e89007cb7b62151cb1869e49b27ebacfc27eb.tar.gz
This brings -nntpd startup time down from ~35s to ~5s with 50K
inboxes.

Further improvements ought to be possible with deeper changes to
MiscIdx, since -mda having to load every inbox seems unreasonable;
but this general change is fairly unintrusive.
Diffstat (limited to 't/search.t')
-rw-r--r--t/search.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/search.t b/t/search.t
index 11143204..3754717d 100644
--- a/t/search.t
+++ b/t/search.t
@@ -332,13 +332,13 @@ $ibx->with_umask(sub {
                 like($smsg->{to}, qr/\blist\@example\.com\b/, 'to appears');
                 my $doc = $m->get_document;
                 my $col = PublicInbox::Search::BYTES();
-                my $bytes = PublicInbox::SearchIdx::int_val($doc, $col);
+                my $bytes = PublicInbox::Search::int_val($doc, $col);
                 like($bytes, qr/\A[0-9]+\z/, '$bytes stored as digit');
                 ok($bytes > 0, '$bytes is > 0');
                 is($bytes, $smsg->{bytes}, 'bytes Xapian value matches Over');
 
                 $col = PublicInbox::Search::UID();
-                my $uid = PublicInbox::SearchIdx::int_val($doc, $col);
+                my $uid = PublicInbox::Search::int_val($doc, $col);
                 is($uid, $smsg->{num}, 'UID column matches {num}');
                 is($uid, $m->get_docid, 'UID column matches docid');
         }