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

Re: [PATCH 2/3] midx: verify: group objects by packfile to speed up object verification

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Mar 19, 2019, 14:00 UTC
Message-ID
<d3f119b1-22f6-e34a-a68f-883aca3d8013@jeffhostetler.com>
In-Reply-To
<87lg1bet9d.fsf@evledraar.gmail.com>
On 3/18/2019 6:02 PM, Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> 
> On Mon, Mar 18 2019, Jeff Hostetler wrote:
> 
>> On 3/18/2019 11:53 AM, Ævar Arnfjörð Bjarmason wrote:
>>>
>>> On Mon, Mar 18 2019, Jeff Hostetler via GitGitGadget wrote:
>>>
[...]
Show 14 quoted lines
>>>> +	QSORT(pairs, m->num_objects, compare_pair_pos_vs_id);
>>>> +
>>>> +	for (k = 0; k < m->num_objects; k++) {
>>>> [...]
>>>
>>> I have not tested this (or midx in general), but isn't this new QSORT()
>>> introducing the same sort of progress stalling that I fixed for
>>> commit-graph in 890226ccb57 ("commit-graph write: add itermediate
>>> progress", 2019-01-19)? I.e. something you can work around with a
>>> "display_progress(progress, 0)" before the QSORT().
>>>
>>
>> I wasn't tracking your commit-graph changes, but yes, I think it is.
>>
[...]
Show 21 quoted lines
>>
>> There is the dead time while the sort() itself is running, but at least
>> there is isn't a 5+ second frozen at 0% message on screen.
> 
> Yeah, the same with the commit-graph with my hack. I.e. it'll sit there,
> but at least it sits like this:
> 
>      What I was doing before 100% (X/Y)
>      What I'm about to start doing 0% (0/Z) [hanging]
> 
> Instead of:
> 
>      What I was doing before 100% (X/Y)
>      [hanging]
> 
> So that's an improvement, i.e. you know it's started that next phase at
> least instead of just having a non-descriptive hang.
> 
> Ideally there would be some way to reach into the QSORT() and display
> progress there, but that's all sorts of nasty, so as the TODO comment in
> commit-graph.c notes I punted it.
Perhaps I'm confused or this is a Windows issue, but when I do:
	progress = start_delayed_progress("sorting", n);
	display_progress(progress, 0);
	QSORT(...);
	stop_progress(&progress);

I never see the 0% message. It always does the hang with the cursor in column 0 on a blank line. If I make this a regular start_progress(), I do see the 0% message for the duration of the qsort hang.

I did some similar testing around your QSORT() in commit-graph.c and got the same result. It looks like start_delayed_processing() wants to wait at least 2 seconds before displaying anything and has an interval timer to notify it that another message should be printed, but the display_progress(0) prior to the QSORT() arrives before the 2 seconds are up and so nothing is printed. It's not until we get into the loop below the QSORT that one of the display_progress(i+1) calls could cause a message to appear.

Right? Jeff

Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 9 of 26 in “multi-pack-index: fix verify on large repos”
  1. 0/3 multi-pack-index: fix verify on large reposJeff Hostetler via GitGitGadget, Mar 18, 2019
  2. 1/3 midx: verify: add midx packfiles to the packed_git listJeff Hostetler via GitGitGadget, Mar 18, 2019
  3. 3/3 trace2:data: add trace2 data to midxJeff Hostetler via GitGitGadget, Mar 18, 2019
  4. 2/3 midx: verify: group objects by packfile to speed up object verificationJeff Hostetler via GitGitGadget, Mar 18, 2019
  5. Ævar Arnfjörð BjarmasonMar 18, 2019
  6. Jeff HostetlerMar 18, 2019
  7. Ævar Arnfjörð BjarmasonMar 18, 2019
  8. Junio C HamanoMar 19, 2019
  9. Jeff HostetlerMar 19, 2019
  10. Ævar Arnfjörð BjarmasonMar 19, 2019
  11. 0/4 multi-pack-index: fix verify on large reposJeff Hostetler via GitGitGadget, Mar 19, 2019
  12. 1/4 progress: add sparse mode to force 100% complete messageJeff Hostetler via GitGitGadget, Mar 19, 2019
  13. Eric SunshineMar 19, 2019
  14. Jeff HostetlerMar 19, 2019
  15. Eric SunshineMar 19, 2019
  16. 3/4 midx: verify: add midx packfiles to the packed_git listJeff Hostetler via GitGitGadget, Mar 19, 2019
  17. Jeff HostetlerMar 19, 2019
  18. 2/4 trace2:data: add trace2 data to midxJeff Hostetler via GitGitGadget, Mar 19, 2019
  19. 4/4 midx: verify: group objects by packfile to speed up object verificationJeff Hostetler via GitGitGadget, Mar 19, 2019
  20. 0/4 multi-pack-index: fix verify on large reposJeff Hostetler via GitGitGadget, Mar 21, 2019
  21. 2/4 trace2:data: add trace2 data to midxJeff Hostetler via GitGitGadget, Mar 21, 2019
  22. 3/4 midx: add progress indicators in multi-pack-index verifyJeff Hostetler via GitGitGadget, Mar 21, 2019
  23. 1/4 progress: add sparse mode to force 100% complete messageJeff Hostetler via GitGitGadget, Mar 21, 2019
  24. 4/4 midx: during verify group objects by packfile to speed verificationJeff Hostetler via GitGitGadget, Mar 21, 2019
  25. Junio C HamanoMar 22, 2019
  26. Jeff HostetlerMar 25, 2019

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.