improve printing performance of command output