Batching of data logging to significantly improve speed.