]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
extindex: eliminate repeated ->eidx_key method call
authorEric Wong <e@80x24.org>
Fri, 10 Jan 2025 23:19:04 +0000 (23:19 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Jan 2025 04:45:38 +0000 (04:45 +0000)
No need to make two relatively expensive `->' method calls when
one will do.

lib/PublicInbox/ExtSearchIdx.pm

index 76699c6b3befaa4e81fae977bd8f4c4b7e56a8b6..6693542b6584b2959283027561b240579acade8d 100644 (file)
@@ -254,8 +254,8 @@ sub index_unseen ($) {
        $self->{oidx}->add_overview($eml, $new_smsg);
        my $oid = $new_smsg->{blob};
        my $ibx = delete $req->{ibx} or die 'BUG: {ibx} unset';
-       $self->{oidx}->add_xref3($docid, $req->{xnum}, $oid, $ibx->eidx_key);
-       $new_smsg->{eidx_key} = $ibx->eidx_key;
+       my $ekey = $new_smsg->{eidx_key} = $ibx->eidx_key;
+       $self->{oidx}->add_xref3($docid, $req->{xnum}, $oid, $ekey);
        $idx->index_eml($eml, $new_smsg);
        update_checkpoint $self, $new_smsg->{bytes};
 }