Closed
Description
Overall, ProgressBar
is not a CPU-greedy widget. It does bring a small yet noticeable increase in CPU consumption when left in "indeterminate" mode since this mode involves a sliding animation. As far as I can tell, this is both normal and acceptable.
However, I noticed this CPU consumption does not decrease when the progress bar is hidden (e.g. self.progress_bar.styles.display = 'none'
). This could be improved by adjusting Bar.auto_refresh
whenever necessary.
Currently, Bar.auto_refresh
only reacts to changes of the percentage
attribute:
textual/src/textual/widgets/_progress_bar.py
Lines 90 to 95 in fd36937
Metadata
Metadata
Assignees
Labels
No labels