]> Sergey Matveev's repositories - public-inbox.git/commit
searchmsg: add git object ID to doc_data
authorEric Wong <e@80x24.org>
Tue, 2 Aug 2016 10:02:54 +0000 (10:02 +0000)
committerEric Wong <e@80x24.org>
Thu, 4 Aug 2016 00:04:53 +0000 (00:04 +0000)
commit95acd5901491e4f333f5d2bbeed6fb5e6b53e07c
treef8e53e9f38ea3710499ca7799936bfd1af352601
parent4caa17ef5aa8554d78b8c013096f12429c58e050
searchmsg: add git object ID to doc_data

Doing git tree lookups based on the SHA-1 of the Message-ID
is expensive as trees get larger, instead, use the SHA-1
object ID directly.  This drastically reduces the amount
of time spent in the "git cat-file --batch" process for
fetching the /$INBOX/all.mbox.gz endpoint on the ~800MB
git@vger.kernel.org mirror

This retains backwards compatibility and allows existing
indices to be transparently upgraded without performance
degradation.
lib/PublicInbox/Inbox.pm
lib/PublicInbox/Mbox.pm
lib/PublicInbox/SearchIdx.pm
lib/PublicInbox/SearchMsg.pm