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

RE: git --archive

From
SRScheffenegger, Richard <richard.scheffenegger@netapp.com>
Date
Sep 23, 2022, 16:51 UTC
Message-ID
<PH0PR06MB7639A83F08BF3B286E5FEB3886519@PH0PR06MB7639.namprd06.prod.outlook.com>
In-Reply-To
<xmqqedw2vysc.fsf@gitster.g>
Show 10 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
>> Maybe they can technically be stored in any order, but people don't 
>> want git archive to produce non-deterministic archives...
>> ...  I feel like it would be very difficult to achieve the speedups 
>> you want and still produce a deterministic archive.
>
> I am not going to work on it myself, but I think the only possible parallelism would come from making the reading for F(n+1) and subsequent objects overlap writing of F(n), given a deterministic order of files in the resulting archive.  When we decide which file should come first, and learns that it is F(0), it probably comes the tree object of the root level, and it is very likely that we would already know what F(1) and F(2) are by that time, so it should be possible to dispatch reading and applying content filtering on F(1) and keeping the result in core, while we are still writing F(0) out.
>
> Thanks.
Yes. But even preceeding any changes in the actual tree traversal to collect the objects one-by-one as currently, a "simple" parallelized, recursive walk over all objects, pseudo-randomly reading a fraction of the data (mostly directories, but also files to update all the (externally) cached inode metadata, should help. As long as this stage is highly parallelizes, it's cost (in time) would be recovered in a much faster single-threaded tree recursion just as exists currently.
That is not to say, that the above method wouldn't be a significant improvement again 😊
Previous: Junio C HamanoNext: René Scharfe
Message 6 of 12 in “git --archive”
  1. Scheffenegger, RichardSep 22, 2022
  2. Junio C HamanoSep 22, 2022
  3. Scheffenegger, RichardSep 22, 2022
  4. brian m. carlsonSep 23, 2022
  5. Junio C HamanoSep 23, 2022
  6. Scheffenegger, RichardSep 23, 2022
  7. René ScharfeSep 24, 2022
  8. Scheffenegger, RichardSep 24, 2022
  9. René ScharfeSep 24, 2022
  10. René ScharfeSep 24, 2022
  11. René ScharfeSep 25, 2022
  12. Scheffenegger, RichardSep 24, 2022

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.