about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-07-23 10:56:11 +0000
committerEric Wong <e@80x24.org>2021-07-25 00:11:36 +0000
commit1218bee34cf04498ac36add5c7e847698be541c2 (patch)
tree142afb972faffd2f01c1369cd1858cf36eb5b8ea /lib/PublicInbox/LeiXSearch.pm
parentd15bd6a20a836473479d8431682ba305e2dcdfbe (diff)
downloadpublic-inbox-1218bee34cf04498ac36add5c7e847698be541c2.tar.gz
SQLite COUNT() is a slow operation that does a full table scan
with no conditions.  There's no need for it, since lei dedupe
only needs to know if it's empty or not to decide between
new/ and cur/ for Maildir outputs.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index cac7fb7d..3414e87d 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -504,7 +504,7 @@ sub do_query {
                 my $F_SETPIPE_SZ = $^O eq 'linux' ? 1031 : undef;
                 if ($l2m->{-wq_nr_workers} > 1 &&
                                 $l2m->{base_type} =~ /\A(?:maildir|mbox)\z/) {
-                        # setup two barriers to coordinate dedupe_nr
+                        # setup two barriers to coordinate ->has_entries
                         # between l2m workers
                         pipe(my ($a_r, $a_w)) or die "pipe: $!";
                         fcntl($a_r, $F_SETPIPE_SZ, 4096) if $F_SETPIPE_SZ;