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

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Oct 4, 2018, 22:52 UTC
Message-ID
<20181004225205.176593-1-jonathantanmy@google.com>
In-Reply-To
<20181004221406.GB28287@sigill.intra.peff.net>
> Yes, I agree with you that the loops are still entwined. They're at
> least now in a single function, though, which IMHO is a slight
> improvement.

Hmm...originally, the main functionality was in a single loop in a single function. But I say that because I consider the lazy loading in tip_oids_contain() as something both peripheral and independent (if the main loop's logic changes, the lazy loading most likely does not need to be changed).

Show 5 quoted lines
> I agree with you that just checking:
> 
>   if (oidset_count() != 0)
> 
> would be fine, too.
OK, we're agreed on this :-)
> Or I am even OK with leaving the existing tablesize
> check. It is a little intimate with the implementation details, but I
> suspect that if oidset were to change (e.g., to initialize the buckets
> immediately), the problem would be pretty apparent in the tests.

I am OK with this too, except that (as far as I can tell) the point of this patch set is to replace the internals of oidset, so we no longer have the tablesize check. Unless you meant the khash analog of tablesize? I would be OK if all tablesize references are replaced with the khash analog in the same patch that the oidset internals are replaced.

Previous: Jeff KingNext: Jeff King
Message 16 of 26 in “oidset: use khash”
  1. 0/2 oidset: use khashRené Scharfe, Oct 3, 2018
  2. 1/2 khash: factor out kh_release_*René Scharfe, Oct 3, 2018
  3. 2/2 oidset: use khashRené Scharfe, Oct 3, 2018
  4. Jeff KingOct 3, 2018
  5. René ScharfeOct 4, 2018
  6. Jeff KingOct 4, 2018
  7. Jeff KingOct 4, 2018
  8. René ScharfeOct 4, 2018
  9. 0/5 oidset: use khashRené Scharfe, Oct 4, 2018
  10. 1/5 fetch-pack: factor out is_unmatched_ref()René Scharfe, Oct 4, 2018
  11. 2/5 fetch-pack: load tip_oids eagerly iff neededRené Scharfe, Oct 4, 2018
  12. Jonathan TanOct 4, 2018
  13. René ScharfeOct 4, 2018
  14. René ScharfeOct 5, 2018
  15. Jeff KingOct 4, 2018
  16. Jonathan TanOct 4, 2018
  17. Jeff KingOct 4, 2018
  18. Jeff KingOct 4, 2018
  19. René ScharfeOct 5, 2018
  20. Jeff KingOct 5, 2018
  21. René ScharfeOct 5, 2018
  22. Jeff KingOct 5, 2018
  23. 3/5 khash: factor out kh_release_*René Scharfe, Oct 4, 2018
  24. 4/5 oidset: use khashRené Scharfe, Oct 4, 2018
  25. 5/5 oidset: uninline oidset_init()René Scharfe, Oct 4, 2018
  26. Jeff KingOct 4, 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.