diff options
author | Eric Wong <e@80x24.org> | 2021-10-10 14:25:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-10 23:29:52 +0000 |
commit | a9ccb76649432e8fb17a8cf1189ac65de1da2d81 (patch) | |
tree | 9e8dd17a3e12b23fa734b94fb91a21aa799e8eb9 /lib/PublicInbox/SearchIdx.pm | |
parent | e26f235e4534d81efd402d30497ebf58ac4a2f74 (diff) | |
download | public-inbox-a9ccb76649432e8fb17a8cf1189ac65de1da2d81.tar.gz |
Avoiding repeated SQL statements brings --gc down to 2-3 minutes from around 10. We'll also add some checkpoints around over and xref3 cleanups.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 78db329d..bebe904b 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -650,8 +650,11 @@ sub xdb_remove_quiet { begin_txn_lazy($self); my $xdb = $self->{xdb} // die 'BUG: missing {xdb}'; eval { $xdb->delete_document($docid) }; + ++$self->{-quiet_rm} unless $@; } +sub nr_quiet_rm { delete($_[0]->{-quiet_rm}) // 0 } + sub index_git_blob_id { my ($doc, $pfx, $objid) = @_; |