gittup/tup — comment on commit 9de9abd1cfddac71f67926d821b9efe69f376009
File: src/tup/progress.c line 70
By gittup:

On Mon, Jan 9, 2012 at 1:10 PM, Anatol

wrote:
> I wonder why "console width" done as an option lookup. It seems unnecessary/expensive to run it on every command.
>
> What is the use-case when you need to configure width of the progress par?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/gittup/tup/commit/9de9abd1cfddac71f67926d821b9efe69f376009#commitcomment-850370

On my machine, these option lookups run at about 500ns each. So for a
million job update, you're only looking at 500ms total.

One use case I have for it is on Windows, where the
GetConsoleScreenBufferInfo() function only works in a Windows command
prompt, but not through an ssh terminal that runs cmd.exe. Here at
least I can set a value manually rather than have the progress bar
disabled entirely. I considered just making 80 a default value instead
of 0 when the function calls don't work, but making it an option
seemed like it would allow some more flexibility if people want to run
in other sized terminals on Windows.

-Mike