This commit is contained in:
Lu Liu 2020-11-25 16:14:38 +08:00 committed by GitHub
parent 46fc9b626e
commit 96789f994c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,10 @@ public class EditInspector {
// so that all newly created entities appear in the batch
SchemaPropertyExtractor fetcher = new SchemaPropertyExtractor();
Set<PropertyIdValue> properties = fetcher.getAllProperties(schema);
List<EntityDocument> propertyDocuments = entityCache.getMultipleDocuments(properties.stream().collect(Collectors.toList()));
if (entityCache != null) {
// Prefetch property documents in one API call rather than requesting them one by one.
entityCache.getMultipleDocuments(properties.stream().collect(Collectors.toList()));
}
WikibaseAPIUpdateScheduler scheduler = new WikibaseAPIUpdateScheduler();
editBatch = scheduler.schedule(editBatch);