Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
KAFKA-8736: Streams performance improvement, use isEmpty() rather tha… #7164
…n size() == 0
According to https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html#size--, the size method has to traverse all elements to get a count. It looks like the count is being compared against 0 to determine if the map is empty; In this case, we don't need a full count. Instead, the isEmpty() method should be used, which just looks for one node.
No expected changes to unit or integration tests.
Committer Checklist (excluded from commit message)
Java 11 / 2.12 failed with
Retest this please
Java 11 / 2.12:
Merging. Thanks for the PR @mjarvie