As of v4.2, the `MongoItemWriter` [uses a for loop to save items through the mongo template](https://github.com/spring-projects/spring-batch/blob/d8fc58338d3b059b67b5f777adc132d2564d7402/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoItemWriter.java#L136-L145). Using `org.springframework.data.mongodb.core.BulkOperations` should give better performance. It should be noted that `template.save` is an [upsert operation](https://docs.spring.io/spring-data/mongodb/docs/2.2.7.RELEASE/api/org/springframework/data/mongodb/core/MongoOperations.html#save-T-java.lang.String-), so we need to use an equivalent operation in the `BulkOperations` API. Reference: https://stackoverflow.com/questions/61644406