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

Re: [PATCH] gc --auto: warn gc will soon run, give users a chance to run manually

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Nov 7, 2011, 10:55 UTC
Message-ID
<CACsJy8DytH+2WcSpxFYWOR-chgorumzDawYyY1S+MKKDzRa6zw@mail.gmail.com>
In-Reply-To
<7vfwi031ts.fsf@alter.siamese.dyndns.org>
2011/11/7 Junio C Hamano <gitster@pobox.com>:
Show 23 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>>  I hate it every single time git hangs because gc is activated.
>>  Opening another terminal is an option but I would lose all terminal
>>  settings I have on the current one (e.g. access to suspended vim
>>  sessions).
>>
>>  I don't think gc_warn_* need their own config vars. Hopefully
>>  hardcoded offset is good enough.
>
> Let's think about How the user chooses a custom value for the threshold
> (or accepts that the default threshold value 6600 is good enough).
>
> ...
>
> Now, I suspect that busier users would need longer window than slower
> ones, which leads me to suspect that a good default would not be a
> hardcoded constant offset (e.g. once you see the new warning, the auto-gc
> kicks in after creating 100 objects) but some ratio of the threshold
> (e.g. you have 2% margin after getting a warning before the auto-gc kicks
> in).

Speaking for myself, as soon as I see the warning, I would immediately start a new shell for git-gc alone and get back to my work (hopefully gc will not be activated again while another gc is running) so one or maybe three warnings may be enough. But yes, some ratio may be better for different users.

-- 
Duy
Previous: Junio C Hamano
Message 4 of 4 in “gc --auto: warn gc will soon run, give users a chance to run manually”
  1. gc --auto: warn gc will soon run, give users a chance to run manuallyNguyễn Thái Ngọc Duy, Nov 5, 2011
  2. Matthieu MoyNov 6, 2011
  3. Junio C HamanoNov 7, 2011
  4. Nguyen Thai Ngoc DuyNov 7, 2011

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.