= performance improve

- using bulk operation instead of iteration if possible
  - terminate loop after condition is met
This commit is contained in:
zavakid
2020-09-18 00:51:10 +08:00
parent e7de8289cd
commit 435db30b7b
2 changed files with 2 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ public class HeartBeatEntryEventHandler extends AbstractCanalEventDownStreamHand
for (Event event : events) {
if (event.getEntryType() == EntryType.HEARTBEAT) {
existHeartBeat = true;
break;
}
}