minor performance tweaks

use buffered streams

minor performance tweaks

buffered streams

undo comment
Merge pull request #434 from yate/performance-improvements

minor performance tweaks