Re: [PATCH 2/2] read-cache: fix incorrect count and progress bar stalling
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 7, 2021, 15:31 UTC
- Message-ID
- <8f336b1b-6cb7-8277-79d5-0f331159b00c@gmail.com>
- In-Reply-To
- <patch-2.2-042f598826-20210607T144206Z-avarab@gmail.com>
On 6/7/2021 10:43 AM, Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> Fix a potential incorrect display of the number of items (off by one) > and stalling of the progress bar in refresh_index(). > > The off-by-one error is minor, we should say we're processing the 1st > item, not the 0th. This along with the next change also allows us to > remove the last display_progress() call outside the loop, as we'll > always have reached 100% now.
This "pre-announce the progress" seems correct and is unlikely to have a user sitting at "100%" while the loop is actually doing work on that last cache entry.
Thanks, -Stolee