Just a little addendum... this lag only happens when the output is a very long continuous string. If I print out 3000 or so LINES of output there's no problem, its only when it's one long continuous string.