Have you run into actual performance issues? Removing this in non-TTY mode would be the most considerable speedup from what I can tell eyeballing this code.