git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: ZheNing Hu <adlternative@gmail.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: "Git List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Hariom verma" <hariom18599@gmail.com>
Subject: Re: [GSoC] Git Blog 12
Date: Wed, 11 Aug 2021 11:47:27 +0800	[thread overview]
Message-ID: <CAOLTT8S0etdnFNKuD7z5QMxWdERZ-FWimn4Sc+u+7Ra1F2WAmA@mail.gmail.com> (raw)
In-Reply-To: <CAOLTT8TQxz2xkQE7etDa3cgb-kRfho-WAyhfHTsK=FrYVsPN1A@mail.gmail.com>

ZheNing Hu <adlternative@gmail.com> 于2021年8月10日周二 下午10:20写道:
>
> Christian Couder <christian.couder@gmail.com> 于2021年8月10日周二 下午4:04写道:
>
> > > parse_object_buffer(), let's take a look at the result of gprof again:
> > >
> > > We need to call grab_sub_body_contents(), grab_person() to rescan the
> > > buffer and extract the data.
> > > What if we can combine these multiple scanning and parsing into one completion?
> > > At least intuitively, this has an opportunity to improve performance.
> >
> > Yeah, but is there a way to check that we indeed scan or parse the
> > same objects multiple times? This way we might get an idea about how
> > much scanning and parsing we could save.
> >
>
> 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.

Thanks,
--
ZheNing Hu

[1]: https://github.com/adlternative/git/commit/7d274971d2b5e1d4e6061d1e29e4a0b2c6a10ea5

  reply	other threads:[~2021-08-11  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09  5:56 [GSoC] Git Blog 12 ZheNing Hu
2021-08-10  8:04 ` Christian Couder
2021-08-10 14:20   ` ZheNing Hu
2021-08-11  3:47     ` ZheNing Hu [this message]
2021-08-11  8:20       ` Christian Couder
2021-08-13  8:25         ` ZheNing Hu
2021-08-11  8:15     ` Christian Couder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOLTT8S0etdnFNKuD7z5QMxWdERZ-FWimn4Sc+u+7Ra1F2WAmA@mail.gmail.com \
    --to=adlternative@gmail.com \
    --cc=avarab@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hariom18599@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).