ExperimentalEventHandler: avoid locking for no-op
The lock here has repeatedly shown up in contention profiles, and this
looks like a reasonable cleanup.
@@ -343,7 +343,12 @@ public class ExperimentalEventHandler implements EventHandler {
public void handle(Event event) {
if (!debugAllEvents
&& !showTimestamp
- && (event.getKind() == EventKind.START || event.getKind() == EventKind.FINISH)) {
+ && (event.getKind() == EventKind.START
+ || event.getKind() == EventKind.FINISH
+ || event.getKind() == EventKind.PASS
+ || event.getKind() == EventKind.TIMEOUT
+ || event.getKind() == EventKind.DEPCHECKER)) {
+ // Keep this in sync with the list of no-op event kinds in handleLocked below.
return;
}
handleLocked(event, /* isFollowUp= */ false);
