Improving performance by limiting maximal terminal size.