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

Re: [PATCH] pack-objects: Print a message describing the number of threads for packing

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Feb 26, 2008, 15:53 UTC
Message-ID
<47C435DC.2070508@nrlssc.navy.mil>
In-Reply-To
<20080226074933.GA3485@coredump.intra.peff.net>
Jeff King wrote:
Show 14 quoted lines
> On Fri, Feb 22, 2008 at 08:12:58PM -0600, Brandon Casey wrote:
> 
>> +	if (progress)
>> +		fprintf(stderr, "Using %d pack threads.\n",
>> +			delta_search_threads);
> 
> I just noticed that this was in next. Do we really need to display this
> message? A considerable amount of discussion went into reducing git's
> chattiness and clutter during push and fetch, and I feel like this is a
> step backwards (yes, I know most people won't see it if they don't build
> with THREADED_DELTA_SEARCH).
> 
> Can we show it only if threads != 1? Only if we auto-detected the number
> of threads and it wasn't 1?
I like the message and thought it was useful especially for non-developers.

Even if the number of threads was not auto-detected, it is a confirmation that the number of threads used is the number of threads configured.

For example, it seems easy to do this:
	git config pack.thread 4
	git repack

The user would immediately know something was wrong when they saw the message "Using 1 pack threads" instead of the "4" they thought they configured. Also, since it's only printed in the THREADED_DELTA_SEARCH case, it's also a confirmation that this option was indeed used for a particular build of git.

Mainly, I thought it was a harmless message that other users would "enjoy" seeing, but if others disagree, I won't argue. Notice I quoted "enjoy" to emphasize it.

I'd also say that if the message is too noisy in the "user explicitly assigned number of threads" case, then it's just as noisy in the "auto assign" case, so just remove the message completely.

We're saying:

If I set pack.threads to 4, I know git is using 4 threads to repack since I told it to use 4 threads. I don't need to see a noisy message telling me so.

If I set pack.threads to 0, I know git is using 4 threads to repack since I have 4 cpus. I don't need to see a noisy message telling me so.

-brandon
Previous: Andreas EricssonNext: Nicolas Pitre
Message 17 of 22 in “pack-objects: Add runtime detection of online CPU's”
  1. pack-objects: Add runtime detection of online CPU'sAndreas Ericsson, Feb 12, 2008
  2. Shawn O. PearceFeb 12, 2008
  3. Johannes SixtFeb 12, 2008
  4. Bert WesargFeb 12, 2008
  5. Andreas EricssonFeb 12, 2008
  6. Michael HendricksFeb 12, 2008
  7. Brandon CaseyFeb 12, 2008
  8. pack-objects: Add runtime detection of online CPU'sBrandon Casey, Feb 23, 2008
  9. Andreas EricssonFeb 23, 2008
  10. pack-objects: Print a message describing the number of threads for packingBrandon Casey, Feb 23, 2008
  11. Jeff KingFeb 26, 2008
  12. Junio C HamanoFeb 26, 2008
  13. Jeff KingFeb 26, 2008
  14. Junio C HamanoFeb 26, 2008
  15. Jeff KingFeb 26, 2008
  16. Andreas EricssonFeb 26, 2008
  17. Brandon CaseyFeb 26, 2008
  18. Nicolas PitreFeb 26, 2008
  19. Jeff KingFeb 26, 2008
  20. Jeff KingFeb 26, 2008
  21. Brandon CaseyFeb 26, 2008
  22. Jeff KingFeb 26, 2008

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.