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

Re: [RFC] Generation Number v2

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 3, 2018, 17:27 UTC
Message-ID
<86r2g2ul51.fsf@gmail.com>
In-Reply-To
<86ftwjzv1h.fsf@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 36 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
>> Stefan Beller <sbeller@google.com> writes:
> [...]
>>> How would this impact creation of a commit?
>>>
>>> The current generation numbers can be lazily updated or not
>>> updated at all. In my understanding of the maximum generation
>>> numbers, a new commit would make these maximum generation
>>> numbers invalid (i.e. they have to be recomputed).
> [...]
>>> For the V2 maximum generation numbers, would we need to
>>> rewrite the numbers for all commits once we recompute them?
>>> Assuming that is true, it sounds like the benchmark doesn't
>>> cover the whole costs associated with V2, which is why the
>>> exceptional performance can be explained.
>>
>> Let's check it using a simple example
>>
>> First, (minimum) parent-based generation numbers before and after
>> extending the commit graph:
>>
>>   1   2     3   4     5   6   7    new
>>   1   2     3   4     5   -   -    old
>>   .---.-----.---.-----.---*---*
>>        \
>>         \   3   4     5   6        new
>>          \  3   4     5   6        old
>>           \-.---.-----.---.
>>                  \
>>                   \   5            new
>>                    \  -            old
>>                     \-*
>
> Let me check yet another idea, using (minimum) parent-based V0 generation
> numbers (counting distance from the sink / root) as a starting number
> for source / heads commits.
[...]
Show 9 quoted lines
> [...] but let's check another example
>
>    1   2     3   4   5   6     7   8   9       new
>    1   2     3   4   5   6     7   8   -       old
>    .---.-----.---.---.---.-----.---.---*
>         \                     /
>          \   3   4           / 5   6   7   8   new
>           \  5   6          /  -   -   -   -   old
>            \-.---.---------/---*---*---*---*
But let's do this correctly.
   1   2     3   4      5   6     7   8   9      new
   1   2     3   4      5   6     7   8   -      old
   .---.-----.---.------.---.-----.---.---*
        \                        /
         \   3   4              /                new
          \  5   6             /                 old
           \-.---.------------/
                  \
                   \    5   6     7   8          new
                    \   -   -     -   -          old
                     \--*---*-----*---*

Well, it looks as if I draw it incorrectly, but performed calculations right. You may need to modify / change some data, but it looks as if it is not that much of a problem.

The new version of the maximum generation numbers looks like it gives the same results as generation numbers for the "longest" path, and update may affect only the side-branches that were added to. All branches merged into the trunk, and not added to should be safe with respect to updating.

Can anyone here prove a thing about update of those modified maximum generation numbers? Thanks in advance.

Best,
-- 
Jakub Narębski
Previous: Jakub NarebskiNext: Derrick Stolee
Message 6 of 17 in “[RFC] Generation Number v2”
  1. Derrick StoleeOct 29, 2018
  2. Stefan BellerOct 29, 2018
  3. Derrick StoleeOct 29, 2018
  4. Jakub NarebskiNov 1, 2018
  5. Jakub NarebskiNov 2, 2018
  6. Jakub NarebskiNov 3, 2018
  7. Derrick StoleeOct 29, 2018
  8. Jakub NarebskiNov 1, 2018
  9. Junio C HamanoOct 30, 2018
  10. Derrick StoleeOct 31, 2018
  11. Jakub NarebskiNov 2, 2018
  12. Ævar Arnfjörð BjarmasonOct 31, 2018
  13. Derrick StoleeOct 31, 2018
  14. Jakub NarebskiNov 2, 2018
  15. Jakub NarebskiNov 1, 2018
  16. Derrick StoleeNov 1, 2018
  17. Jakub NarebskiNov 3, 2018

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.