# [GSoC] Git Blog 7

2 messages from 2021-07-04 to 2021-07-05. Participants: ZheNing Hu, Christian Couder.
Thread: https://gitlist.dev/t/56047

## ZheNing Hu, 2021-07-04 14:42

Subject: [GSoC] Git Blog 7
Message-ID: <CAOLTT8R_=8Md3vk5yBK4dggq1RKof_6c1tOEtfchbSmYf+gwtA@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLTT8R_%3D8Md3vk5yBK4dggq1RKof_6c1tOEtfchbSmYf%2BgwtA%40mail.gmail.com

```
My seventh week blog finished:
The web version is here:
https://adlternative.github.io/GSOC-Git-Blog-7/

## Week7 Performance Testing 2

This week I used performance flame graph at the suggestion of
my mentor `Christian` to find out where my patch affected the
performance of `cat-file --batch`. `oid_object_info_extended()`
takes the largest proportion of time, accounting for `90.28%`
and `41.60%` in `cat-file --batch` and `cat-file --batch-check`
respectively. Part of the reason is that `oid_object_info_extended()`
is called twice in `get_object()` with my patch. I tried to revise its
logic (`WIP`), the performance is improved when without using
`--textconv` and `--filters`.

`Ævar Arnfjörð Bjarmason` gave me a good suggestion on
performance regression: When we use the default format of
`git cat-file --batch-check` or `git cat-file --batch`, we can
directly print the meta-data of the object without going through
the logic of `ref-filter`; When we use other format, use the
logic in ref-filter.

In addition, `Ævar Arnfjörð Bjarmason` also suggests adding a
performance test for `git cat-file --batch`, this can help us analyze
and compare performance changes later.

There are intensive exams in these two weeks, and sometimes the
response may be delayed.

Thanks.
--
ZheNing Hu

```

## Christian Couder, 2021-07-05 19:09

Subject: Re: [GSoC] Git Blog 7
Message-ID: <CAP8UFD1_xjJxWA6O8Sx9-AEk5oC62U4GFkt5iRdx8Po_mJzTMg@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD1_xjJxWA6O8Sx9-AEk5oC62U4GFkt5iRdx8Po_mJzTMg%40mail.gmail.com
In-Reply-To: <CAOLTT8R_=8Md3vk5yBK4dggq1RKof_6c1tOEtfchbSmYf+gwtA@mail.gmail.com>

```
On Sun, Jul 4, 2021 at 4:42 PM ZheNing Hu <adlternative@gmail.com> wrote:
>
> My seventh week blog finished:
> The web version is here:
> https://adlternative.github.io/GSOC-Git-Blog-7/

Thanks!

> ## Week7 Performance Testing 2
>
> This week I used performance flame graph at the suggestion of
> my mentor `Christian` to find out where my patch affected the
> performance of `cat-file --batch`. `oid_object_info_extended()`
> takes the largest proportion of time, accounting for `90.28%`
> and `41.60%` in `cat-file --batch` and `cat-file --batch-check`
> respectively. Part of the reason is that `oid_object_info_extended()`
> is called twice in `get_object()` with my patch. I tried to revise its
> logic (`WIP`), the performance is improved when without using

s/when without/when not/

> `--textconv` and `--filters`.
>
> `Ævar Arnfjörð Bjarmason` gave me a good suggestion on
> performance regression: When we use the default format of
> `git cat-file --batch-check` or `git cat-file --batch`, we can
> directly print the meta-data of the object without going through
> the logic of `ref-filter`; When we use other format, use the
> logic in ref-filter.
>
> In addition, `Ævar Arnfjörð Bjarmason` also suggests adding a
> performance test for `git cat-file --batch`, this can help us analyze
> and compare performance changes later.
>
> There are intensive exams in these two weeks, and sometimes the
> response may be delayed.

Ok, no worries!

```
