user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/4] lei/store: reduce work when accessing mail_sync.sqlite3
  2022-08-17  9:33  5% [PATCH 0/4] lei reindex, minor tweaks Eric Wong
@ 2022-08-17  9:33  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-17  9:33 UTC (permalink / raw)
  To: meta

There's no need to initialize eidx if we already have an open
handle for mail_sync.sqlite3
---
 lib/PublicInbox/LeiStore.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index 66049dfe..d49746cb 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -255,13 +255,13 @@ sub remove_eml_vmd { # remove just the VMD
 
 sub _lms_rw ($) { # it is important to have eidx processes open before lms
 	my ($self) = @_;
-	my ($eidx, $tl) = eidx_init($self);
-	$self->{lms} //= do {
+	$self->{lms} // do {
 		require PublicInbox::LeiMailSync;
+		my ($eidx, $tl) = eidx_init($self);
 		my $f = "$self->{priv_eidx}->{topdir}/mail_sync.sqlite3";
 		my $lms = PublicInbox::LeiMailSync->new($f);
 		$lms->lms_write_prepare;
-		$lms;
+		$self->{lms} = $lms;
 	};
 }
 

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] lei reindex, minor tweaks
@ 2022-08-17  9:33  5% Eric Wong
  2022-08-17  9:33  7% ` [PATCH 3/4] lei/store: reduce work when accessing mail_sync.sqlite3 Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-08-17  9:33 UTC (permalink / raw)
  To: meta

Reindex is far from complete, and probably needs a compact, and
some other fixups for old data + rethread support.

But avoiding false positives from base-85 is nice.

Eric Wong (4):
  searchidx: fix spelling error in comment
  lei inspect: less scary exception for invalid "docid:" inspect
  lei/store: reduce work when accessing mail_sync.sqlite3
  lei reindex: new command to reindex lei/store

 Documentation/lei-reindex.pod | 47 +++++++++++++++++++++++++++++++++
 MANIFEST                      |  2 ++
 lib/PublicInbox/LEI.pm        |  2 ++
 lib/PublicInbox/LeiInspect.pm |  5 ++--
 lib/PublicInbox/LeiReindex.pm | 49 +++++++++++++++++++++++++++++++++++
 lib/PublicInbox/LeiStore.pm   | 38 ++++++++++++++++++++++++---
 lib/PublicInbox/SearchIdx.pm  |  2 +-
 7 files changed, 138 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/lei-reindex.pod
 create mode 100644 lib/PublicInbox/LeiReindex.pm

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-17  9:33  5% [PATCH 0/4] lei reindex, minor tweaks Eric Wong
2022-08-17  9:33  7% ` [PATCH 3/4] lei/store: reduce work when accessing mail_sync.sqlite3 Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).