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

Re: [PATCH 2/2] rev-list: add --disk-usage option for calculating disk usage

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jan 27, 2021, 23:07 UTC
Message-ID
<CAPig+cQTV6ACiOj+GKoBwj15TZBr5craVPT6dYzzSDfrX9a3YA@mail.gmail.com>
In-Reply-To
<YBHmY7vNxu2hqOa/@coredump.intra.peff.net>
On Wed, Jan 27, 2021 at 5:20 PM Jeff King <peff@peff.net> wrote:
Show 13 quoted lines
> This patch implements a --disk-usage option which produces the same
> answer in a fraction of the time. Here are some timings using a clone of
> torvalds/linux:
>
>   [rev-list piped to cat-file, no bitmaps]
>   $ time git rev-list --objects --all |
>     cut -d' ' -f1 |
>     git cat-file --buffer --batch-check='%(objectsize:disk)' |
>     perl -lne '$total += $_; END { print $total }'
>   1455691059
>   real  0m34.336s
>   user  0m46.533s
>   sys   0m2.953s
This example shows the computed size (1455691059)...
Show 10 quoted lines
> But the real win is with bitmaps. If we use them without the new option:
>
>   [rev-list piped to cat-file, bitmaps]
>   $ time git rev-list --objects --all --use-bitmap-index |
>     cut -d' ' -f1 |
>     git cat-file --batch-check='%(objectsize:disk)' |
>     perl -lne '$total += $_; END { print $total }'
>   real  0m9.954s
>   user  0m11.234s
>   sys   0m8.522s

...however, this example does not (but all the others do). Simple copy/paste error?

Not worth a re-roll, of course.
Previous: Jeff KingNext: Jeff King
Message 7 of 30 in “rev-list --disk-usage”
  1. 0/2 rev-list --disk-usageJeff King, Jan 27, 2021
  2. 1/2 t: add --no-tag option to test_commitJeff King, Jan 27, 2021
  3. Taylor BlauJan 27, 2021
  4. 2/2 rev-list: add --disk-usage option for calculating disk usageJeff King, Jan 27, 2021
  5. Taylor BlauJan 27, 2021
  6. Jeff KingJan 27, 2021
  7. Eric SunshineJan 27, 2021
  8. Jeff KingJan 27, 2021
  9. Kyle MeyerJan 27, 2021
  10. Jeff KingJan 27, 2021
  11. Taylor BlauJan 27, 2021
  12. rev-list --disk-usageJeff King, Feb 9, 2021
  13. 1/2 t: add --no-tag option to test_commitJeff King, Feb 9, 2021
  14. 2/2 rev-list: add --disk-usage option for calculating disk usageJeff King, Feb 9, 2021
  15. Jeff KingFeb 9, 2021
  16. Junio C HamanoFeb 9, 2021
  17. Jeff KingFeb 10, 2021
  18. Junio C HamanoFeb 10, 2021
  19. Taylor BlauFeb 10, 2021
  20. Jeff KingFeb 10, 2021
  21. Junio C HamanoFeb 10, 2021
  22. Jeff KingFeb 10, 2021
  23. Taylor BlauFeb 10, 2021
  24. Jeff KingFeb 11, 2021
  25. Ævar Arnfjörð BjarmasonFeb 11, 2021
  26. Junio C HamanoFeb 11, 2021
  27. 0/2 rev-list --disk-usage example docsJeff King, Feb 17, 2021
  28. 1/2 docs/rev-list: add an examples sectionJeff King, Feb 17, 2021
  29. 2/2 docs/rev-list: add some examples of --disk-usageJeff King, Feb 17, 2021
  30. Taylor BlauFeb 17, 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.