Show progress while loading the record index
On a database with tens of millions of records, indexing the existing rows before the walk takes real single-core time with no output, which is indistinguishable from a hang. Give the load its own spinner, and render every phase display the moment the phase starts instead of waiting for its first completed item.
This commit is contained in:
@@ -65,6 +65,9 @@ func newProgress(label string, total int64) *progress {
|
||||
progressbar.OptionSetItsString("files"),
|
||||
progressbar.OptionSetElapsedTime(true),
|
||||
progressbar.OptionThrottle(barThrottle),
|
||||
// Render at zero immediately: a phase must be visible the
|
||||
// moment it starts, even before its first item completes.
|
||||
progressbar.OptionSetRenderBlankState(true),
|
||||
}
|
||||
if total >= 0 {
|
||||
opts = append(opts,
|
||||
|
||||
Reference in New Issue
Block a user