From ea258ad64c506324742e619414e46abf5554e9df Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Jan 2025 23:19:04 +0000 Subject: [PATCH] extindex: eliminate repeated ->eidx_key method call No need to make two relatively expensive `->' method calls when one will do. --- lib/PublicInbox/ExtSearchIdx.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 76699c6b3..6693542b6 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -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}; } -- 2.47.3