KarmaGYZ commented on a change in pull request #14897:
URL: https://github.com/apache/flink/pull/14897#discussion_r573402886
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/util/ResourceCounter.java
##########
@@ -35,11 +37,12 @@
* associated counts. The counts are always positive (> 0).
*/
public final class ResourceCounter {
Review comment:
@tillrohrmann I write a test in which I add two types of resources
profile with 8000 times respectively(8000 * 8000 wordcount case). I run the
test with mutable and immutable `ResourceCounter` for 100 times. The total time
cost by immutable `ResourceCounter` is 700ms while the time cost by mutable
`ResourceCounter` is 200ms. I think that might make sense to do that
optimization. Actually, I'm not quite sure about the benefit of keeping it
immutable. But if the benefit really matters, I also agree to keep it
immutable, since it is might not be the bottleneck of the scheduling atm.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]