Using batch-writing to improve writing speed