mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 19:42:17 +00:00
performance of MongoEndpointImpl.importDatabase(...): re-use cleared ArrayList
This commit is contained in:
1 parent
a53f94d9af
commit
b04b9da818
1 file changed
+1
-1
+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) {
|
||||
|
||||
Reference in new issue
Block a user