Skip to content

Commit

Permalink
increasing performance for storing entities
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-gunjan authored Jul 25, 2023
1 parent f2a39ea commit 924fc7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected MongoCollection getCollection()
public List<StoredVersionedEntity> createOrUpdate(String groupId, String artifactId, String versionId, List<Entity> entityDefinitions)
{
List<StoredVersionedEntity> versionedEntities = new ArrayList<>();
entityDefinitions.forEach(item ->
entityDefinitions.parallelStream().forEach(item ->
{
StoredVersionedEntity storedEntity = new StoredVersionedEntityStringData(groupId, artifactId, versionId);
getCollection().updateOne(getEntityPathFilter(groupId, artifactId, versionId, item.getPath()), combineDocument(storedEntity, item, VERSIONED_ENTITY_TYPE_STRING_DATA), INSERT_IF_ABSENT);
Expand Down

0 comments on commit 924fc7f

Please sign in to comment.