Re: [GSoC] Git Blog 12
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Aug 11, 2021, 08:20 UTC
- Message-ID
- <CAP8UFD19PG7DnFzHF42PUDQ49pr8126ucYLVF6H4mAp61+Od2g@mail.gmail.com>
- In-Reply-To
- <CAOLTT8S0etdnFNKuD7z5QMxWdERZ-FWimn4Sc+u+7Ra1F2WAmA@mail.gmail.com>
On Wed, Aug 11, 2021 at 5:47 AM ZheNing Hu <adlternative@gmail.com> wrote:
> > ZheNing Hu <adlternative@gmail.com> 于2021年8月10日周二 下午10:20写道:
Show 13 quoted lines
> > I think find_subpos() called by grab_sub_body_contents() and find_wholine() > > called by grab_person() are evidences that we are repeating iteratively. > > But the proportion of time they occupy is too small. 0.0142% and 0.0109% > > > > Using such a method may reduce some unnecessary scans [1] > But it can do very little optimization... 1.6%. > On the other hand, our optimization should focus on the default format of > `git cat-file --batch`. > > My new idea is to need a fast path: when we use the default format, > let us directly execute get_object() to avoid unnecessary traversal > and checking.
I think it should be done not only when we use the default format but when we use any format that only needs the metadata provided by get_object(). This way that wouldn't be a special case fast path, but rather a generally useful optimization.