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/over.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/over.t')
-rw-r--r-- | t/over.t | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -40,7 +40,7 @@ my $ddd = compress(''); foreach my $s ('', undef) { $over->add_over([0, 98, [ 'a' ], [], $s, $ddd]); $over->add_over([0, 99, [ 'b' ], [], $s, $ddd]); - my $msgs = [ map { $_->{num} } @{$over->get_thread('a')->{msgs}} ]; + my $msgs = [ map { $_->{num} } @{$over->get_thread('a')} ]; is_deeply([98], $msgs, 'messages not linked by empty subject'); } @@ -48,13 +48,13 @@ foreach my $s ('', undef) { $over->add_over([0, 98, [ 'a' ], [], 's', $ddd]); $over->add_over([0, 99, [ 'b' ], [], 's', $ddd]); foreach my $mid (qw(a b)) { - my $msgs = [ map { $_->{num} } @{$over->get_thread('a')->{msgs}} ]; + my $msgs = [ map { $_->{num} } @{$over->get_thread('a')} ]; is_deeply([98, 99], $msgs, 'linked messages by subject'); } $over->add_over([0, 98, [ 'a' ], [], 's', $ddd]); $over->add_over([0, 99, [ 'b' ], ['a'], 'diff', $ddd]); foreach my $mid (qw(a b)) { - my $msgs = [ map { $_->{num} } @{$over->get_thread($mid)->{msgs}} ]; + my $msgs = [ map { $_->{num} } @{$over->get_thread($mid)} ]; is_deeply([98, 99], $msgs, "linked messages by Message-ID: <$mid>"); } |