You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@
24
24
- Built-in styling for progress bar fills, colors, gradients, and head glyphs.
25
25
- Animated progress titles with a subtle sweeping highlight.
26
26
Set `LOGBAR_ANIMATION=0` to disable the highlight animation.
27
+
- Progress output throttling for reducing redraw churn in batch-heavy jobs.
28
+
Set `LOGBAR_PROGRESS_OUTPUT_INTERVAL=10` to render every 10 logical updates instead of every update.
27
29
- Column-aware table printer with spans, width hints, and `fit` sizing.
28
30
- Zero dependencies; works anywhere Python runs.
29
31
@@ -99,6 +101,15 @@ for _ in log.pb(500).title("Downloading"):
99
101
time.sleep(0.05)
100
102
```
101
103
104
+
When a workload updates progress very frequently, throttle redraw churn globally or per bar:
105
+
106
+
```py
107
+
for _ in log.pb(500, output_interval=10).title("Quantizing"):
108
+
time.sleep(0.01)
109
+
```
110
+
111
+
`output_interval=10` means LogBar will emit a fresh snapshot after roughly every 10 logical progress steps, while still forcing the last pending step to render before the bar closes. Set `LOGBAR_PROGRESS_OUTPUT_INTERVAL=10` to apply the same default process-wide.
112
+
102
113
Manual mode gives full control when you need to interleave logging and redraws:
0 commit comments