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

Re: [PATCH v2 0/2] Optimization batch 6: make full use of exact renames

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2021, 21:56 UTC
Message-ID
<xmqqlfc4byt6.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.842.v2.git.1612382628.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 17 quoted lines
> This series depends on en/merge-ort-perf and makes full use of exact
> renames; see commit messages for details.
>
> Thanks to Stolee and Junio for reviewing v1.
>
> Changes since v1:
>
>  * Update rename_src_nr when updating rename_src
>  * Introduce want_copies in the first patch and use it in a few more places
>  * Move a comment below a few exit-early if-checks.
>
> Elijah Newren (2):
>   diffcore-rename: no point trying to find a match better than exact
>   diffcore-rename: filter rename_src list when possible
>
>  diffcore-rename.c | 69 +++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 61 insertions(+), 8 deletions(-)
Thanks, these look bettrer.

With these changes, I guess there are only two things I find myself somewhat embarrassing in the rename machinery that is still there since I invented it.

 - We still need to go full matrix while finding the "best"
   pairing.  I cannot think of a way to avoid it (that is what makes
   it embarrassing) but wish there were some way to.
   In an early attempt, I tried to retire rename_src[j], once
   rename_dst[i] has been found to be a "good enough" match for it,
   from the pool of rename src candidates to find a good match for
   rename_dst[k] for i < k, but naive implementation of it would not
   work well for obvious reasons---rename_src[j] may match a lot
   better with rename_dst[k] than rename_dst[i] but we do not know
   that until we try to estimate similarity with rename_dst[k].
 - The .cnt_data member was designed to be a concise summary of the
   blob characteristics so that two .cnt_data can be "compared"
   fairly cheaply to see how "similar" two blobs are [*], but (1) it
   is rather big to be called a "concise summary", and (2) it was
   not chosen after real performance measurement, and we've been
   using it for the past 15 years without revisiting its design.
   Side note: In a very early prototype, the approach to assess
   similarity between two blobs was very different---there was no
   attempt to compute "concise summary" for each blob, but we just
   attempted to create delta (as in the pack data) between src and
   dst blobs and measured how small a delta we can use to transform
   from src to dst.
Previous: Elijah NewrenNext: Elijah Newren
Message 17 of 25 in “Optimization batch 6: make full use of exact renames”
  1. 0/2 Optimization batch 6: make full use of exact renamesElijah Newren via GitGitGadget, Feb 3, 2021
  2. 1/2 diffcore-rename: no point trying to find a match better than exactElijah Newren via GitGitGadget, Feb 3, 2021
  3. Derrick StoleeFeb 3, 2021
  4. Elijah NewrenFeb 3, 2021
  5. Junio C HamanoFeb 3, 2021
  6. Elijah NewrenFeb 3, 2021
  7. 2/2 diffcore-rename: filter rename_src list when possibleElijah Newren via GitGitGadget, Feb 3, 2021
  8. Junio C HamanoFeb 3, 2021
  9. Elijah NewrenFeb 3, 2021
  10. 0/2 Optimization batch 6: make full use of exact renamesElijah Newren via GitGitGadget, Feb 3, 2021
  11. 1/2 diffcore-rename: no point trying to find a match better than exactElijah Newren via GitGitGadget, Feb 3, 2021
  12. 2/2 diffcore-rename: filter rename_src list when possibleElijah Newren via GitGitGadget, Feb 3, 2021
  13. Junio C HamanoFeb 13, 2021
  14. Elijah NewrenFeb 13, 2021
  15. Junio C HamanoFeb 13, 2021
  16. Elijah NewrenFeb 13, 2021
  17. Junio C HamanoFeb 3, 2021
  18. Elijah NewrenFeb 3, 2021
  19. Junio C HamanoFeb 3, 2021
  20. Jeff KingFeb 3, 2021
  21. Elijah NewrenFeb 4, 2021
  22. 0/2 Optimization batch 6: make full use of exact renamesElijah Newren via GitGitGadget, Feb 14, 2021
  23. 1/2 diffcore-rename: no point trying to find a match better than exactElijah Newren via GitGitGadget, Feb 14, 2021
  24. 2/2 diffcore-rename: filter rename_src list when possibleElijah Newren via GitGitGadget, Feb 14, 2021
  25. Elijah NewrenFeb 3, 2021

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.