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

Re: [RFC] Possible idea for GSoC 2020

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 13, 2020, 10:56 UTC
Message-ID
<86tv2s34lo.fsf@gmail.com>
In-Reply-To
<xmqqo8t2hfxj.fsf@gitster.c.googlers.com>
Cc: Stolee, Heba, Jonathan T., Emily Shaffer. 
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
>
>> A few questions:
>> - is it too late to propose a new project idea for GSoC 2020?
>> - is it too difficult of a project for GSoC?
>> ...
>> ### Graph labelling for speeding up git commands
>>
>>  - Language: C
>>  - Difficulty: hard / difficult
>>  - Possible mentors: Jakub Narębski
>
> I am not running the GSoC or participating in it in any way other
> than just being a reviewer-maintainer of the project, but I would
> appreciate a well-thought-out write-up very much.

I have prepared slides for "Graph operations in Git version control system" (PDF), mainly describing what was already done to improve their performance, but they also include a few thoughts about the future (like additional graph reachability labelings)... unfortunately the slides are in Polish, not in English.

If there is interest, I could translate them, and put the result somewhere accessible.

Or I could try to make this information into blog post -- this topic would really gain from using images (like Derrick Stolee series of articles on commit-graph).

Show 49 quoted lines
>> Git uses various clever methods for making operations on very large
>> repositories faster, from bitmap indices for git-fetch[1], to generation
>> numbers (also known as topological levels) in the commit-graph file for
>> commit graph traversal operations like `git log --graph`[2].
>>
>> One possible improvement that can make Git even faster is using min-post
>> intervals labelling.  The basis of this labelling is post-visit order of
>> a depth-first search traversal tree of a commit graph, let's call it
>> 'post(v)'.
>>
>> If for each commit 'v' we would compute and store in the commit-graph
>> file two numbers: 'post(v)' and the minimum of 'post(u)' for all commits
>> reachable from 'v', let's call the latter 'min_graph(v)', then the
>> following condition is true:
>>
>>   if 'v' can reach 'u', then min_graph(v) <= post(u) <= post(v)
>>
>> If for each commit 'v' we would compute and store in the commit-graph
>> file two numbers: 'post(v)' and the minimum of 'post(u)' for commits
>> that were visited during the part of depth-first search that started
>> from 'v' (which is the minimum of post-order number for subtree of a
>> spanning tree that starts at 'v').  Let's call the later 'min_tree(v)'.
>> Then the following condition is true:
>>
>>   if min_tree(v) <= post(u) <= post(v), then 'v' can reach 'u'
>>
>> The task would be to implement computing such labelling (or a more
>> involved variant of it[3][4]), storing it in commit-graph file, and
>> using it for speeding up git commands (starting from a single chosen
>> command) such as:
>>
>>  - git merge-base --is-ancestor A B
>>  - git branch --contains A
>>  - git tag --contains A
>>  - git branch --merged A
>>  - git tag --merged A
>>  - git merge-base --all A B
>>  - git log --topo-sort
>>
>> References:
>>
>> 1. <http://githubengineering.com/counting-objects/>
>> 2. <https://devblogs.microsoft.com/devops/supercharging-the-git-commit-graph-iii-generations/>
>> 3. <https://arxiv.org/abs/1404.4465>
>> 4. <https://github.com/steps/Ferrari>
>>
>> See also discussion in:
>>
>> <https://public-inbox.org/git/86tvl0zhos.fsf@gmail.com/t/>

P.S. A bit more expanded writeup now available at https://git.github.io/SoC-2020-Ideas/

Best,
-- 
Jakub Narębski
Previous: Junio C HamanoNext: Jakub Narebski
Message 3 of 27 in “[RFC] Possible idea for GSoC 2020”
  1. Jakub NarebskiMar 10, 2020
  2. Junio C HamanoMar 11, 2020
  3. Jakub NarebskiMar 13, 2020
  4. Jakub NarebskiMar 15, 2020
  5. Kaartic SivaraamMar 17, 2020
  6. Kaartic SivaraamMar 17, 2020
  7. Jakub NarebskiMar 17, 2020
  8. Christian CouderMar 11, 2020
  9. Jakub NarebskiMar 11, 2020
  10. Christian CouderMar 11, 2020
  11. Jakub NarebskiMar 12, 2020
  12. Jakub NarebskiMar 12, 2020
  13. Jakub NarebskiMar 13, 2020
  14. Philip OakleyMar 13, 2020
  15. Jakub NarebskiMar 13, 2020
  16. Philip OakleyMar 15, 2020
  17. Jakub NarebskiMar 15, 2020
  18. Philip OakleyMar 16, 2020
  19. Derrick StoleeMar 16, 2020
  20. Jakub NarebskiMar 17, 2020
  21. Christian CouderMar 17, 2020
  22. Derrick StoleeMar 17, 2020
  23. Jakub NarebskiMar 17, 2020
  24. Christian CouderMar 17, 2020
  25. Jakub NarebskiMar 18, 2020
  26. Derrick StoleeMar 18, 2020
  27. Jakub NarebskiMar 19, 2020

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.