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

Re: [GSoC] Git Blog 12

From
ZheNing Hu <adlternative@gmail.com>
Date
Aug 13, 2021, 08:25 UTC
Message-ID
<CAOLTT8QKapv6mFAr_AicDvivPPxZhan2hpbvQXvXMX6WeVMBpQ@mail.gmail.com>
In-Reply-To
<CAP8UFD19PG7DnFzHF42PUDQ49pr8126ucYLVF6H4mAp61+Od2g@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> 于2021年8月11日周三 下午4:20写道:
Show 23 quoted lines
>
> 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写道:
>
> > > 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.

Sorry, the reply is a bit late. These two days have been busy implementing more valuable performance optimization patches. I finally did not implement the above plan. At present, ref-filter does have some small areas worth optimizing. A large part of the remaining performance loss comes from more allocated memory and more copying. We must bear a certain gap in performance. But we can minimize it as much as possible. This is perhaps the most reasonable at present.

Let’s forget about the previous commit-slab for now and take a look at my new optimization these two days: https://lore.kernel.org/git/pull.1016.git.1628842990.gitgitgadget@gmail.com/

Thanks. -- ZheNing Hu

Previous: Christian CouderNext: Christian Couder
Message 6 of 7 in “[GSoC] Git Blog 12”
  1. ZheNing HuAug 9, 2021
  2. Christian CouderAug 10, 2021
  3. ZheNing HuAug 10, 2021
  4. ZheNing HuAug 11, 2021
  5. Christian CouderAug 11, 2021
  6. ZheNing HuAug 13, 2021
  7. Christian CouderAug 11, 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.