git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC] Git Blog 11

From
Christian Couder <christian.couder@gmail.com>
Date
Aug 4, 2021, 08:56 UTC
Message-ID
<CAP8UFD3E9oR9E4S=f8iReKOnvVO_WrXVziyztHZJCiScUAxDRg@mail.gmail.com>
In-Reply-To
<CAOLTT8QDo1A4tRqU0w-yas8OxrHB6uQ_PECswUQtQ7yY2-iWgw@mail.gmail.com>
On Tue, Aug 3, 2021 at 4:48 AM ZheNing Hu <adlternative@gmail.com> wrote:
Show 32 quoted lines
>
> ZheNing Hu <adlternative@gmail.com> 于2021年8月3日周二 上午10:37写道:
> >
> > Christian Couder <christian.couder@gmail.com> 于2021年8月2日周一 下午2:25写道:
> > >
> > > On Sun, Aug 1, 2021 at 8:45 AM ZheNing Hu <adlternative@gmail.com> wrote:
> > >
> > > > in some cases, this is the result of the performance test of
> > > > `t/perf/p1006-cat-file.sh`:
> > > >
> > > > ```
> > > > Test                                        HEAD~             HEAD
> > > > ------------------------------------------------------------------------------------
> > > > 1006.2: cat-file --batch-check              0.10(0.09+0.00)
> > > > 0.11(0.10+0.00) +10.0%
> > > > 1006.3: cat-file --batch-check with atoms   0.09(0.08+0.01)
> > > > 0.09(0.06+0.03) +0.0%
> > > > 1006.4: cat-file --batch                    0.62(0.58+0.04)
> > > > 0.57(0.54+0.03) -8.1%
> > > > 1006.5: cat-file --batch with atoms         0.63(0.60+0.02)
> > > > 0.52(0.49+0.02) -17.5%
> > > > ```
> > > >
> > > > We can see that the performance of `git cat-file --batch` has been a
> > > > certain improvement!
> > >
> > > Yeah, sure -8.1% or -17.5% is really nice! But why +10.0% for
> > > `cat-file --batch-check`?
> >
> > I think it's not very important. Because our optimization is skipping
> > parse_object_buffer(), git cat-file --batch-check will not set oi->contentp
> > by default, parse_object_buffer() will not be executed.

Do you think that if git cat-file --batch-check would set oi->contentp, there would be no performance regression for `cat-file --batch-check`? Could you test that?

Show 6 quoted lines
> > Therefore, we did
> > not optimize `git cat-file --batch-check` at all. 10% may be small enough
> > for git cat-file --batch-check. The noise of environment even will cover it...
>
> By the way, its performance may still be worse than "upstream/master", but it
> will be better than before optimization.

Nice that there is some improvement, but it would be better if it was similar to "upstream/master".

Show 10 quoted lines
> Test                                        HEAD~             this tree
> ------------------------------------------------------------------------------------
> 1006.2: cat-file --batch-check              0.10(0.09+0.01)
> 0.09(0.08+0.01) -10.0%
> 1006.3: cat-file --batch-check with atoms   0.09(0.07+0.02)
> 0.08(0.05+0.03) -11.1%
> 1006.4: cat-file --batch                    0.61(0.59+0.02)
> 0.53(0.51+0.02) -13.1%
> 1006.5: cat-file --batch with atoms         0.60(0.57+0.02)
> 0.52(0.49+0.03) -13.3%

Yeah, your patch seems to be an overall improvement when the ref-filter code is used.

Show 11 quoted lines
> Test                                        upstream/master   this
> tree
> ------------------------------------------------------------------------------------
> 1006.2: cat-file --batch-check              0.08(0.07+0.01)
> 0.10(0.07+0.02) +25.0%
> 1006.3: cat-file --batch-check with atoms   0.06(0.05+0.01)
> 0.08(0.08+0.00) +33.3%
> 1006.4: cat-file --batch                    0.49(0.46+0.03)
> 0.53(0.50+0.03) +8.2%
> 1006.5: cat-file --batch with atoms         0.48(0.45+0.03)
> 0.51(0.48+0.02) +6.3%

This means that some further performance improvements are still needed both for --batch and --batch-check though.

Have you tried to see, using gprof or something else, what is still degrading the performance compared to when the ref-filter code isn't used?

Previous: ZheNing HuNext: ZheNing Hu
Message 5 of 6 in “[GSoC] Git Blog 11”
  1. ZheNing HuAug 1, 2021
  2. Christian CouderAug 2, 2021
  3. ZheNing HuAug 3, 2021
  4. ZheNing HuAug 3, 2021
  5. Christian CouderAug 4, 2021
  6. ZheNing HuAug 5, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.