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

Re: [PATCH v2 0/5] builtin/repo: include largest object information

From
Justin Tobler <jltobler@gmail.com>
Date
Mar 1, 2026, 19:22 UTC
Message-ID
<aaR6a7o4omOIWJSe@denethor>
In-Reply-To
<EB04AA40-87BA-41D9-B2DC-92E87FACEB54@gmail.com>
On 26/02/28 08:43PM, Lucas Seiki Oshiro wrote:
> I was trying this patch series and I noticed that it took
> more time to run than before. In my machine, I tested it
> with the Git repository itself and it took 6s to run, while
> it took 3s to run in the current master [1].

Yes, now that objects are being parsed to fetch additional commit/tree information we incur some additional overhead when collecting metrics.

With git-repo-structure, the goal is to provide the user with an overview of size/structure related statistics that may showcase problems for a given repostiory and is directly inspired by git-sizer [1]. Thus as it currently stands, the implementation of git-repo-structure is still incomplete and as we collect additional metrics in subseqent series the performance characteristics may still change.

> I understand the reason and I don't think we could avoid
> that, but I'm wondering if wouldn't be nice to have some
> way to only retrieve the "lighter" data (perhaps a flag,
> or something like the keys in git-repo-info).

If the main motivation is to allow the user to reduce the time spent by selecting only a subset of metrics, I don't think using keys like git-repo-info would be a good fit. Most of the collected metrics pull from the same data sources so including/excluding any given metric may not have any bearing on actual performance. For example: if the user wants to collect largest object info which is a more expensive check, we still have to collect the underlying data used by the other metrics regardless of if they are shown or not. Furthermore, it would likely not be obvious to users which categories of metrics would be more expensive than others.

I could maybe see something akin to a `--[no-]extended` option that breaks metrics into cheap/expensive categories and computes/displays the metrics accordingly, but it would be important that the default set of metrics collected satisfy the repository overview this command aims to provide.

If we are more interested in adding a mechanism to filter git-repo-structure results independent of performance considerations, maybe we could eventually explore adding something like the git-repo-info keys or a `--filter` option to restrict the output to a specified subset. At the same time though, it is probably easy enough for git-repo-structure users to filter the machine-parsable output themselves if they wish to do so. For now I think this should be fine, but an included result filtering option is still something we could explore in the future. :)

Thanks, -Justin

[1]: https://github.com/github/git-sizer
Previous: Lucas Seiki OshiroNext: Justin Tobler
Message 33 of 50 in “builtin/repo: include largest object information”
  1. 0/5 builtin/repo: include largest object informationJustin Tobler, Feb 3, 2026
  2. 1/5 builtin/repo: update stats for each objectJustin Tobler, Feb 3, 2026
  3. 2/5 builtin/repo: collect largest inflated objectsJustin Tobler, Feb 3, 2026
  4. 3/5 builtin/repo: add OID annotations to table outputJustin Tobler, Feb 3, 2026
  5. 4/5 builtin/repo: find commit with most parentsJustin Tobler, Feb 3, 2026
  6. 5/5 builtin/repo: find tree with most entriesJustin Tobler, Feb 3, 2026
  7. Junio C HamanoFeb 3, 2026
  8. Junio C HamanoFeb 3, 2026
  9. Junio C HamanoFeb 3, 2026
  10. Junio C HamanoFeb 3, 2026
  11. Kristoffer HaugsbakkFeb 3, 2026
  12. Junio C HamanoFeb 3, 2026
  13. Patrick SteinhardtFeb 4, 2026
  14. Junio C HamanoFeb 4, 2026
  15. Patrick SteinhardtFeb 13, 2026
  16. Justin ToblerFeb 18, 2026
  17. Justin ToblerFeb 18, 2026
  18. Justin ToblerFeb 18, 2026
  19. Justin ToblerFeb 18, 2026
  20. 0/5 builtin/repo: include largest object informationJustin Tobler, Feb 23, 2026
  21. 1/5 builtin/repo: update stats for each objectJustin Tobler, Feb 23, 2026
  22. 2/5 builtin/repo: collect largest inflated objectsJustin Tobler, Feb 23, 2026
  23. 3/5 builtin/repo: add OID annotations to table outputJustin Tobler, Feb 23, 2026
  24. 4/5 builtin/repo: find commit with most parentsJustin Tobler, Feb 23, 2026
  25. 5/5 builtin/repo: find tree with most entriesJustin Tobler, Feb 23, 2026
  26. Patrick SteinhardtFeb 24, 2026
  27. Junio C HamanoFeb 26, 2026
  28. Justin ToblerFeb 26, 2026
  29. Junio C HamanoFeb 26, 2026
  30. Junio C HamanoFeb 26, 2026
  31. Lucas Seiki OshiroFeb 28, 2026
  32. Lucas Seiki OshiroFeb 28, 2026
  33. Justin ToblerMar 1, 2026
  34. Justin ToblerMar 2, 2026
  35. Justin ToblerMar 2, 2026
  36. Justin ToblerMar 2, 2026
  37. 0/6 builtin/repo: include largest object informationJustin Tobler, Mar 2, 2026
  38. 1/6 builtin/repo: update stats for each objectJustin Tobler, Mar 2, 2026
  39. 2/6 builtin/repo: add helper for printing keyvalue outputJustin Tobler, Mar 2, 2026
  40. 3/6 builtin/repo: collect largest inflated objectsJustin Tobler, Mar 2, 2026
  41. 4/6 builtin/repo: add OID annotations to table outputJustin Tobler, Mar 2, 2026
  42. 5/6 builtin/repo: find commit with most parentsJustin Tobler, Mar 2, 2026
  43. 6/6 builtin/repo: find tree with most entriesJustin Tobler, Mar 2, 2026
  44. Junio C HamanoMar 2, 2026
  45. Patrick SteinhardtMar 3, 2026
  46. Patrick SteinhardtMar 3, 2026
  47. Junio C HamanoMar 3, 2026
  48. Justin ToblerMar 3, 2026
  49. Junio C HamanoMar 6, 2026
  50. Justin ToblerMar 8, 2026

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.