about summary refs log tree commit homepage
path: root/t/search-thr-index.t
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-02 00:04:55 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-02 00:05:42 +0000
commit87dca6d8d5988c5eb54019cca342450b0b7dd6b7 (patch)
treea415a88759b88014d30544addbb69c5949ed76f0 /t/search-thr-index.t
parent3cc5ff405d9054fbf47ac44774fca4f9a72ff65a (diff)
downloadpublic-inbox-87dca6d8d5988c5eb54019cca342450b0b7dd6b7.tar.gz
In many cases, we do not care about the total number of
messages.  It's a rather expensive operation in SQLite
(Xapian only provides an estimate).

For LKML, this brings top-level /$INBOX/ loading time from
~375ms to around 60ms on my system.  Days ago, this operation
was taking 800-900ms(!) for me before introducing the SQLite
overview DB.
Diffstat (limited to 't/search-thr-index.t')
-rw-r--r--t/search-thr-index.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/search-thr-index.t b/t/search-thr-index.t
index 3ddef809..2aa97bff 100644
--- a/t/search-thr-index.t
+++ b/t/search-thr-index.t
@@ -49,8 +49,8 @@ foreach (reverse split(/\n\n/, $data)) {
 
 my $prev;
 foreach my $mid (@mids) {
-        my $res = $rw->{over}->get_thread($mid);
-        is(3, $res->{total}, "got all messages from $mid");
+        my $msgs = $rw->{over}->get_thread($mid);
+        is(3, scalar(@$msgs), "got all messages from $mid");
 }
 
 $rw->commit_txn_lazy;