Skip to content

Commit

Permalink
reduce number invocations of EntityIdSet.contains()
Browse files Browse the repository at this point in the history
  • Loading branch information
penemue committed Feb 21, 2020
1 parent c4751fd commit 3965f07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internal class FilterEntitiesWithCertainLinkIterable(txn: PersistentStoreTransac
private fun nextAvailableId(): EntityId? {
while (it.hasNext()) {
val next = it.nextId()
if (!distinctIds.contains(next) && idSet.contains(it.targetId)) {
if (idSet.contains(it.targetId) && !distinctIds.contains(next)) {
return next
}
}
Expand Down

0 comments on commit 3965f07

Please sign in to comment.