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

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 14, 2017, 01:10 UTC
Message-ID
<xmqq7eut8y36.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<7e5a9fde-67fc-2bb9-51b6-54bdaed162db@gmail.com>
Ben Peart <peartben@gmail.com> writes:
Show 6 quoted lines
> The proposed format for extensions (ie having both a header and a
> footer with name and size) in the current patch already enables having
> multiple extensions that can be parsed forward or backward.  Any
> extensions that would want to be parse-able in reverse would just all
> need to be written one after the other after right before the trailing
> SHA1 (and of course, include the proper footer).

In other words, anything that wants to be scannable from the tail is welcome to reimplement the same validation structure used by IEOT to check the section specific sanity constraint, and this series is not interested in introducing a more general infrastructure to make it easy for code that want to find where each extension section in the file begins without pasing the body of the index.

I find it somewhat unsatisfactory in that it is a fundamental change to allow jumping to the start of an extension section from the tail that can benefit any future codepath, and have expected a feature neutral extension whose sole purpose is to do so [*1*].

That way, extension sections whose names are all-caps can stay to be optional, even if they allow locating from the tail of the file. If you require them to implement the same validation struture as IEOT to perform section specific sanity constraint and also require them to be placed consecutively at the end, the reader MUST know about all such extensions---otherwise they cannot scan backwards and find ones that appear before an unknown but optional one. If you keep an extension section at the end whose sole purpose is to point at the beginning of extension sections, the reader can then scan forward as usual, skipping over unknown but optional ones, and reading your IEOT can merely be an user (and the first user) of that more generic feature that is futureproof, no?

Previous: Ben PeartNext: Ben Peart
Message 5 of 19 in “Speed up index load through parallelization”
  1. 0/4 Speed up index load through parallelizationBen Peart, Nov 9, 2017
  2. 1/4 fastindex: speed up index load through parallelizationBen Peart, Nov 9, 2017
  3. Junio C HamanoNov 10, 2017
  4. Ben PeartNov 13, 2017
  5. Junio C HamanoNov 14, 2017
  6. Ben PeartNov 14, 2017
  7. Junio C HamanoNov 14, 2017
  8. Ben PeartNov 14, 2017
  9. Junio C HamanoNov 15, 2017
  10. Ben PeartNov 15, 2017
  11. Junio C HamanoNov 15, 2017
  12. Ben PeartNov 20, 2017
  13. Jeff KingNov 20, 2017
  14. Jeff KingNov 20, 2017
  15. Ramsay JonesNov 20, 2017
  16. Ben PeartNov 21, 2017
  17. 2/4 update-index: add fastindex support to update-indexBen Peart, Nov 9, 2017
  18. 3/4 fastindex: add test tools and a test scriptBen Peart, Nov 9, 2017
  19. 4/4 fastindex: add documentation for the fastindex extensionBen Peart, Nov 9, 2017

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.