Performance optimization: Reduced size of batch and the frequency of the output