arunpandianp commented on code in PR #33736:
URL: https://github.com/apache/beam/pull/33736#discussion_r1926364463


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/Work.java:
##########
@@ -88,7 +87,7 @@ private Work(
     this.watermarks = watermarks;
     this.clock = clock;
     this.startTime = clock.get();
-    this.totalDurationPerState = new EnumMap<>(LatencyAttribution.State.class);
+    this.totalDurationPerState = new HashMap<>();

Review Comment:
   EnumMap is constructing a keyUniverse array in the constructor which shows 
up in profiles, replacing it with hashmap to speed up work submit loop. 
   <img width="1693" alt="Screenshot 2025-01-22 at 9 00 34 PM" 
src="https://github.com/user-attachments/assets/ae4bca8c-d2fa-4f07-9631-d20173623f8d";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to