From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 607CA1F9FD for ; Sat, 27 Mar 2021 11:45:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/4] lei_ale: do not create store unnecessarily Date: Sat, 27 Mar 2021 11:45:48 +0000 Message-Id: <20210327114551.3607-2-e@80x24.org> In-Reply-To: <20210327114551.3607-1-e@80x24.org> References: <20210327114551.3607-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We want to be able to read blobs without writing anything to disk. --- lib/PublicInbox/LeiALE.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiALE.pm b/lib/PublicInbox/LeiALE.pm index 45748435..cb570ab4 100644 --- a/lib/PublicInbox/LeiALE.pm +++ b/lib/PublicInbox/LeiALE.pm @@ -28,7 +28,8 @@ sub new { my ($self, $lei) = @_; ref($self) or $self = _new($lei->cache_dir . '/all_locals_ever.git'); my $lxs = PublicInbox::LeiXSearch->new; - $lxs->prepare_external($lei->_lei_store(1)->search); + my $sto = $lei->_lei_store; + $lxs->prepare_external($sto->search) if $sto; for my $loc ($lei->externals_each) { # locals only $lxs->prepare_external($loc) if -d $loc; }