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
Currently, we attempt to run tput as a subprocess just before printing a progress bar, this is obviously a huge waste since the terminal width doesn't change that often.
We should measure the terminal width once, and update that value only when the terminal width changes. We can be informed of such changes by registering a signal handler for SIGWINCH.
Due to the complexities of handling signals from a multithreaded python program, this item might be impossible or very difficult, and I have no idea how to test it.
Acceptance
The _OutputAccumulator class shells out to tput once at program startup, and then only again when the controlling terminal size changes.
The text was updated successfully, but these errors were encountered:
Currently, we attempt to run
tput
as a subprocess just before printing a progress bar, this is obviously a huge waste since the terminal width doesn't change that often.We should measure the terminal width once, and update that value only when the terminal width changes. We can be informed of such changes by registering a signal handler for
SIGWINCH
.Due to the complexities of handling signals from a multithreaded python program, this item might be impossible or very difficult, and I have no idea how to test it.
Acceptance
The
_OutputAccumulator
class shells out totput
once at program startup, and then only again when the controlling terminal size changes.The text was updated successfully, but these errors were encountered: