diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-02 00:04:55 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-02 00:05:42 +0000 |
commit | 87dca6d8d5988c5eb54019cca342450b0b7dd6b7 (patch) | |
tree | a415a88759b88014d30544addbb69c5949ed76f0 /t/v2-add-remove-add.t | |
parent | 3cc5ff405d9054fbf47ac44774fca4f9a72ff65a (diff) | |
download | public-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/v2-add-remove-add.t')
-rw-r--r-- | t/v2-add-remove-add.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/v2-add-remove-add.t b/t/v2-add-remove-add.t index b6c58872..c8d12d34 100644 --- a/t/v2-add-remove-add.t +++ b/t/v2-add-remove-add.t @@ -35,8 +35,8 @@ ok($im->add($mime), 'message added'); ok($im->remove($mime), 'message added'); ok($im->add($mime), 'message added again'); $im->done; -my $res = $ibx->recent({limit => 1000}); -is($res->{msgs}->[0]->{mid}, 'a-mid@b', 'message exists in history'); -is(scalar @{$res->{msgs}}, 1, 'only one message in history'); +my $msgs = $ibx->recent({limit => 1000}); +is($msgs->[0]->{mid}, 'a-mid@b', 'message exists in history'); +is(scalar @$msgs, 1, 'only one message in history'); done_testing(); |