Codebase list golang-github-vbauerster-mpb / 4c4c0ac
initialStructBufCap Vladimir Bauer 2 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1414 )
1515
1616 // buffer capacity allocated per bar structure (prepend|filler|append)
17 const defaultStructBufCap = 256
17 const initialStructBufCap = 256
1818 const defaultRefreshRate = 150 * time.Millisecond
1919
2020 // DoneError represents use after `(*Progress).Wait()` error.
467467 }
468468
469469 for i := 0; i < len(bs.buffers); i++ {
470 bs.buffers[i] = bytes.NewBuffer(make([]byte, 0, defaultStructBufCap))
470 bs.buffers[i] = bytes.NewBuffer(make([]byte, 0, initialStructBufCap))
471471 }
472472
473473 return bs