VASTLY improve performance of batchlog writes with some caching