Re: [PATCH] Speed up "gdb -tui" output

Eli Zaretskii
2015-01-06T19:06:34Z

> Date: Tue, 6 Jan 2015 10:37:13 -0800
> From: Doug Evans <dje@google.com>
> Cc: gdb-patches <gdb-patches@sourceware.org>
>
> bash$ gdb -tui
> (gdb) file foo<ret>
>
> At this point I've hit return but I don't see anything printed.
>
> pause pause pause
>
> and then finally I see all the output:
>
> Reading symbols from foo...done.
> mumble ...
> (gdb)

If this is the only place where this matters, we could break that line
in two:

Reading symbols from foo...
Done reading symbols from foo.

Or maybe we could also call wrefresh when we see 3 consecutive dots,
assuming that these are the cases where a prolonged operation is under
way.

> Another possibility would be to do the string -> char -> string
> processing differently. String printing utilities could accumulate
> what they want to print and send the output in chunks instead
> of characters.
> Then tui_puts could get real strings instead of always getting
> { char, '\0' }, and maybe that would be enough.

This will hit the same problem: how to know when to stop accumulating
and flush it out.