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

Re: [PATCH v1] read_index_from(): Skip verification of the cache entry order to speed index loading

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2017, 01:14 UTC
Message-ID
<xmqqh8uuipsv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171019160532.54teojqnhkeo2yfv@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> It should be easy enough to check that; the patch below implements it.
> I couldn't measure any speedup with it running "git ls-files >/dev/null"
> on linux.git (60k files). But nor could I get any by dropping the check
> entirely.

I would expect that the speedup (due to possible cache effect) wouldn't be measurable if the overhead of the existing check itself is unmeasuably not-expensive. No suprise here.

Show 5 quoted lines
> This is mostly just a curiosity to me. For the record, I have no real
> problem with dropping this kind of on-disk data-structure validation
> when it's expensive. After all, we do not check the sort on pack .idx
> files on each run (nor pack sha1 checksums, etc) because it's too
> expensive to do so.

Yes, I agree with that stance, too. If this were expensive in the overall picture to be measurable, I think we are OK omitting when the index is read, especially if we make sure we are not writing out nonsense trees out of it. Local damage to the index is very contained as long as we do not spread breakages to trees and commits.

Previous: Jeff KingNext: Stefan Beller
Message 5 of 18 in “read_index_from(): Skip verification of the cache entry order to speed index loading”
  1. read_index_from(): Skip verification of the cache entry order to speed index loadingBen Peart, Oct 18, 2017
  2. Junio C HamanoOct 19, 2017
  3. Ben PeartOct 19, 2017
  4. Jeff KingOct 19, 2017
  5. Junio C HamanoOct 20, 2017
  6. Stefan BellerOct 19, 2017
  7. Johannes SchindelinOct 20, 2017
  8. Stefan BellerOct 20, 2017
  9. Junio C HamanoOct 21, 2017
  10. read_index_from(): Skip verification of the cache entry order to speed index loadingBen Peart, Oct 24, 2017
  11. Ben PeartOct 30, 2017
  12. Jeff KingOct 30, 2017
  13. Alex VandiverOct 31, 2017
  14. Ben PeartOct 31, 2017
  15. Jeff KingOct 31, 2017
  16. Junio C HamanoNov 1, 2017
  17. Junio C HamanoOct 31, 2017
  18. Ben PeartOct 31, 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.