Uses buffers to get much better performance.