performance of MongoEndpointImpl.importDatabase(...): re-use cleared ArrayList

This commit is contained in:
Axel Uhl committed 2024-01-15 15:55:48 +01:00
1 parent a53f94d9af
commit b04b9da818
1 file changed
+1 -1
@@ -59,7 +59,7 @@ public abstract class MongoEndpointImpl implements MongoEndpoint {
if (i>=BATCH_SIZE) {
targetCollection.insertMany(documentsToInsert);
i = 0;
documentsToInsert = new ArrayList<>(BATCH_SIZE);
documentsToInsert.clear();
}
}
if (i>0) {