Terminal protocols spew a *lot* of output
faho opened this issue · comments
We now enable "terminal protocols", like bracketed paste, CSI u key codes etc.
This was always going to lead to more output to the terminal, which is overall fine - we've always been pretty chatty (highlighting, suggestions, etc).
But I think the current state may be a bit much. It'll not only adversely impact performance (especially over ssh), but is also in the way when you look at a log like with script
or asciinema
.
As it stands, starting fish --no-config and running echo foobar
prints on the order of ~1500 bytes (3.7.1 does ~800 bytes) - counted with script
and wc -c
.
In particular, it will apparently enable and disable protocols multiple times before it even gets to the input - I count 8 times before it gets to the prompt (in --no-config mode).
Most of this is down to toggling it in parser::eval_node:
Lines 565 to 581 in e7f13ac
Remove it and we're down to ~980 bytes, which would be reasonable.
@krobelus Is that one necessary? Is there a better spot to put it? It strikes me as suspect to do it there.