threads / patch / 48845

patch, 4 partsUse oid_object_info() instead of read_object_file()

Subject: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

## tl;dr

6 messages between Jul 9, 2018 and Jul 18, 2018. Diffs are folded; open one to read it.

replies: 5people: 3as markdown or json

Оля Тележная· Jul 9, 2018, 08:27 UTC · lore

Hello everyone, This is my new attempt to start using oid_object_info_extended() in ref-filter. You could look at previous one [1] [2] but it is not necessary.

The goal (still) is to improve performance by avoiding calling expensive functions when we don't need the information they provide or when we could get it by using a cheaper function.

This patch is a middle step. In the end, I want to add new atoms ("objectsize:disk" and "deltabase") and reuse ref-filter logic in cat-file command.

I also know about problems with memory leaks in ref-filter: that would be my next task that I will work on. Since I did not generate any new leaks in this patch (just use existing ones), I decided to put this part on a review and fix leaks as a separate task.

Thank you!

[1] https://github.com/git/git/pull/493 [2] https://public-inbox.org/git/010201637254c969-a346030e-0b75-41ad-8ef3-2ac7e04ba4fb-000000@eu-west-1.amazonses.com/

Junio C Hamano· Jul 9, 2018, 22:42 UTC · re: Оля Тележная · lore

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

Оля Тележная  <olyatelezhnaya@gmail.com> writes:
> Hello everyone,
> This is my new attempt to start using oid_object_info_extended() in
> ref-filter. You could look at previous one [1] [2] but it is not
> necessary.

Yup, it sounds like a sensible thing to do to try asking object-info helper instead of reading the whole object in-core and inspecting it ourselves when we can avoid it.

Johannes Schindelin· Jul 10, 2018, 09:47 UTC · re: Оля Тележная · lore

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

Hi Olga,
On Mon, 9 Jul 2018, Оля Тележная wrote:
> [2] https://public-inbox.org/git/010201637254c969-a346030e-0b75-41ad-8ef3-2ac7e04ba4fb-000000@eu-west-1.amazonses.com/

This type of Message-Id makes me think that you used SubmitGit to send this patch series.

The main problem I see here is that the patches are not sent as replies to this cover letter, and therefore they are seemingly disconnected on the mailing list.

It was also my impression that SubmitGit started supporting sending cover letters, in which case you would not have to jump through hoops to thread the mails properly. But for that to work, the PR has to have a description which is then used as cover letter. I do not see any description in https://github.com/git/git/pull/520, though. Maybe provide one?

Ciao, Johannes

P.S.: You might have noticed that I am working (slowly, but steadily) on a contender for SubmitGit that I call GitGitGadget. Originally, I really wanted to enhance SubmitGit instead because I am a big believer of *not* reinventing the wheel (so much energy gets wasted that way).

However, in this case the limitations of the chosen language (I do not want to learn Scala, I have absolutely zero need to know Scala in any of my other endeavors, and my time to learn new things is limited, so I spend it wisely) and the limitations of the design (the UI is completely separate from GitHub, you have to allow Amazon to send mails in your name, and SubmitGit's design makes it impossible to work bi-directionally, it is only GitHub -> mailing list, while I also want the option to add replies on the mailing list as comments to the GitHub PR in the future) made me reconsider.

If you want to kick the tires, so to say, I welcome you to give GitGitGadget a try. It would require only a couple of things from you:

- You would have to settle for a branch name, and then not open new PRs
  for every iteration you want to send, but force-push the branch instead.
- You would have to open a PR at https://github.com/gitgitgadget/git.
- You would have to provide the cover letter via the PR's description (and
  update that description before sending newer iterations).
- I would have to add you to the list of users allowed to send patches via
  GitGitGadget (GitGitGadget has some really light-weight access control
  to prevent spamming).
- You would then send a new iteration by simply adding a comment to your
  PR that contains this command: /submit
- To integrate well with previous patch series iterations (i.e. to connect
  the threads), I would have to come up with a little bit of tooling to
  add some metadata that I have to reconstruct manually from your
  previously-sent iterations.
Оля Тележная· Jul 13, 2018, 12:46 UTC · re: Оля Тележная · lore

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

2018-07-09 11:27 GMT+03:00 Оля Тележная <olyatelezhnaya@gmail.com>:
Show 17 quoted lines
> Hello everyone,
> This is my new attempt to start using oid_object_info_extended() in
> ref-filter. You could look at previous one [1] [2] but it is not
> necessary.
>
> The goal (still) is to improve performance by avoiding calling expensive
> functions when we don't need the information they provide
> or when we could get it by using a cheaper function.
>
> This patch is a middle step. In the end, I want to add new atoms
> ("objectsize:disk" and "deltabase") and reuse ref-filter logic in
> cat-file command.
>
> I also know about problems with memory leaks in ref-filter: that would
> be my next task that I will work on. Since I did not generate any new
> leaks in this patch (just use existing ones), I decided to put this
> part on a review and fix leaks as a separate task.

UPDATES since v1: add init to eaten variable (thanks to Szeder Gabor, Johannes Schindelin) improve second commit message (thanks to Junio C Hamano) add static keyword (thanks to Ramsay Jones)

Show 5 quoted lines
>
> Thank you!
>
> [1] https://github.com/git/git/pull/493
> [2] https://public-inbox.org/git/010201637254c969-a346030e-0b75-41ad-8ef3-2ac7e04ba4fb-000000@eu-west-1.amazonses.com/
Johannes Schindelin· Jul 18, 2018, 12:13 UTC · re: Оля Тележная · lore

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

Hi Olga,
On Fri, 13 Jul 2018, Оля Тележная wrote:
Show 28 quoted lines
> 2018-07-09 11:27 GMT+03:00 Оля Тележная <olyatelezhnaya@gmail.com>:
> > Hello everyone,
> > This is my new attempt to start using oid_object_info_extended() in
> > ref-filter. You could look at previous one [1] [2] but it is not
> > necessary.
> >
> > The goal (still) is to improve performance by avoiding calling expensive
> > functions when we don't need the information they provide
> > or when we could get it by using a cheaper function.
> >
> > This patch is a middle step. In the end, I want to add new atoms
> > ("objectsize:disk" and "deltabase") and reuse ref-filter logic in
> > cat-file command.
> >
> > I also know about problems with memory leaks in ref-filter: that would
> > be my next task that I will work on. Since I did not generate any new
> > leaks in this patch (just use existing ones), I decided to put this
> > part on a review and fix leaks as a separate task.
> 
> UPDATES since v1:
> add init to eaten variable (thanks to Szeder Gabor, Johannes Schindelin)
> improve second commit message (thanks to Junio C Hamano)
> add static keyword (thanks to Ramsay Jones)
> 
> >
> > Thank you!
> >
> > [1] https://github.com/git/git/pull/493

Could you please populate the description of that PR so that SubmitGit picks it up as cover letter?

Thanks, Johannes

> > [2] https://public-inbox.org/git/010201637254c969-a346030e-0b75-41ad-8ef3-2ac7e04ba4fb-000000@eu-west-1.amazonses.com/
> 
Junio C Hamano· Jul 18, 2018, 17:56 UTC · re: Johannes Schindelin · lore

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 35 quoted lines
> Hi Olga,
>
> On Fri, 13 Jul 2018, Оля Тележная wrote:
>
>> 2018-07-09 11:27 GMT+03:00 Оля Тележная <olyatelezhnaya@gmail.com>:
>> > Hello everyone,
>> > This is my new attempt to start using oid_object_info_extended() in
>> > ref-filter. You could look at previous one [1] [2] but it is not
>> > necessary.
>> >
>> > The goal (still) is to improve performance by avoiding calling expensive
>> > functions when we don't need the information they provide
>> > or when we could get it by using a cheaper function.
>> >
>> > This patch is a middle step. In the end, I want to add new atoms
>> > ("objectsize:disk" and "deltabase") and reuse ref-filter logic in
>> > cat-file command.
>> >
>> > I also know about problems with memory leaks in ref-filter: that would
>> > be my next task that I will work on. Since I did not generate any new
>> > leaks in this patch (just use existing ones), I decided to put this
>> > part on a review and fix leaks as a separate task.
>> 
>> UPDATES since v1:
>> add init to eaten variable (thanks to Szeder Gabor, Johannes Schindelin)
>> improve second commit message (thanks to Junio C Hamano)
>> add static keyword (thanks to Ramsay Jones)
>> 
>> >
>> > Thank you!
>> >
>> > [1] https://github.com/git/git/pull/493
>
> Could you please populate the description of that PR so that SubmitGit
> picks it up as cover letter?

Thanks for suggesting that. Yes, an updated version of a series, even if it is a small one with just 4 or 5 patches, becomes much easier to read with a well-written cover letter.

← back to recent threads