Skip to content

Commit 527ff20

Browse files
ATLAS-5025: entity-create perf improvement - skip setLabel call when empty (#339)
1 parent ff8e083 commit 527ff20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ public AtlasVertex createVertexWithGuid(AtlasEntity entity, String guid) throws
336336

337337
setCustomAttributes(ret, entity);
338338

339-
setLabels(ret, entity.getLabels());
339+
if (CollectionUtils.isNotEmpty(entity.getLabels())) {
340+
setLabels(ret, entity.getLabels());
341+
}
340342

341343
GraphTransactionInterceptor.addToVertexCache(guid, ret);
342344

0 commit comments

Comments
 (0)