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

Re: Make the git codebase thread-safe

From
David Kastrup <dak@gnu.org>
Date
Apr 2, 2019, 11:52 UTC
Message-ID
<87d0m462up.fsf@fencepost.gnu.org>
In-Reply-To
<CACsJy8BuJbxj5fHwTc+aogWcWGR_6A0CXS78-h0zi4rYLa0kXQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 47 quoted lines
> On Tue, Apr 2, 2019 at 5:30 PM David Kastrup <dak@gnu.org> wrote:
>>
>> Duy Nguyen <pclouds@gmail.com> writes:
>>
>> > On Tue, Apr 2, 2019 at 7:52 AM Matheus Tavares
>> > <matheus.bernardino@usp.br> wrote:
>> >> I downloaded chromium to give it a try and got (on a machine with i7 and
>> >> SSD, running Manjaro Linux):
>> >>
>> >> - 17s on blame for a file with long history[2]
>> >> - 2m on blame for a huge file[3]
>> >> - 15s on log for both [2] and [3]
>> >> - 1s for git status
>> >>
>> >> It seems quite a lot, especially with SSD, IMO.
>> >
>> > There have been a couple of optimizations that are probably still not
>> > enabled by default because they only benefit large repos.
>>
>> I've proposed a trivial change in 2014 that could have cut down typical
>> blame times significantly but nobody was interested in testing and
>> committing it, and it is conceivable that in limited-memory situations
>> it might warrant some accounting/mitigation for weird histories (not
>> that there isn't other code like that).
>
> I didn't really read the patch (I don't know much about blame.c to
> really contribute anything there). But a quick "git blame --show-stats
> unpack-trees.c" shows this
>
> Without the patch:
>
> num read blob: 767
> num get patch: 425
> num commits: 343
>
> With the patch:
>
> num read blob: 419
> num get patch: 425
> num commits: 343
>
> That's a nice reduction of blob reading. On a typical small file, the
> actual time saving might be not much. But it could really help when
> you blame a large file.
>
> Perhaps you could resubmit it again for inclusion? (at least a
> sign-off-by is missing then)
I don't expect it to go anywhere but will do.  Feel free to herd it.
-- 
David Kastrup
Previous: Duy NguyenNext: Matheus Tavares Bernardino
Message 44 of 55 in “Make the git codebase thread-safe”
  1. Stefan ZagerFeb 12, 2014
  2. Robin H. JohnsonFeb 12, 2014
  3. Duy NguyenFeb 12, 2014
  4. Karsten BleesFeb 12, 2014
  5. Mike HommeyFeb 12, 2014
  6. Karsten BleesFeb 13, 2014
  7. Stefan ZagerFeb 12, 2014
  8. Duy NguyenFeb 12, 2014
  9. Stefan ZagerFeb 12, 2014
  10. Matthieu MoyFeb 12, 2014
  11. Stefan ZagerFeb 12, 2014
  12. David KastrupFeb 12, 2014
  13. Stefan ZagerFeb 12, 2014
  14. David KastrupFeb 12, 2014
  15. Mike HommeyFeb 12, 2014
  16. David KastrupFeb 13, 2014
  17. Mike HommeyFeb 13, 2014
  18. Mike HommeyFeb 13, 2014
  19. David KastrupFeb 13, 2014
  20. Junio C HamanoFeb 12, 2014
  21. Stefan ZagerFeb 12, 2014
  22. Junio C HamanoFeb 12, 2014
  23. Erik Faye-LundFeb 12, 2014
  24. Stefan ZagerFeb 12, 2014
  25. Erik Faye-LundFeb 12, 2014
  26. Stefan ZagerFeb 12, 2014
  27. Erik Faye-LundFeb 12, 2014
  28. Karsten BleesFeb 12, 2014
  29. Stefan ZagerFeb 12, 2014
  30. Johannes SixtFeb 13, 2014
  31. David KastrupFeb 13, 2014
  32. Stefan ZagerFeb 13, 2014
  33. Zachary TurnerFeb 13, 2014
  34. Karsten BleesFeb 13, 2014
  35. Stefan ZagerFeb 13, 2014
  36. Zachary TurnerFeb 13, 2014
  37. Karsten BleesFeb 14, 2014
  38. Stefan ZagerFeb 14, 2014
  39. brian m. carlsonFeb 13, 2014
  40. Matheus TavaresApr 2, 2019
  41. Duy NguyenApr 2, 2019
  42. David KastrupApr 2, 2019
  43. Duy NguyenApr 2, 2019
  44. David KastrupApr 2, 2019
  45. Matheus Tavares BernardinoApr 2, 2019
  46. Zachary TurnerFeb 14, 2014
  47. Karsten BleesFeb 14, 2014
  48. Duy NguyenFeb 15, 2014
  49. Stefan ZagerFeb 15, 2014
  50. Duy NguyenFeb 15, 2014
  51. Zachary TurnerFeb 15, 2014
  52. Duy NguyenFeb 15, 2014
  53. Junio C HamanoFeb 18, 2014
  54. Zachary TurnerFeb 18, 2014
  55. Stefan ZagerFeb 14, 2014

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.