You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2023/01/05 16:56:10 UTC

[GitHub] [beam] lostluck commented on a diff in pull request #24881: Reduce lock contention for metrics hashName hasher

lostluck commented on code in PR #24881:
URL: https://github.com/apache/beam/pull/24881#discussion_r1062686389


##########
sdks/go/pkg/beam/core/metrics/metrics_test.go:
##########
@@ -617,21 +617,23 @@ func TestPcolQueryResult(t *testing.T) {
 	}
 }
 
-// Run on @lostluck's desktop (2020/01/21) go1.13.4
+// Run on @shanemhansen's desktop (2022/01/03) go1.20 RC1 after changing hashName to use a pool of hashers
+// sync.Pool can return thread-local results eliminating the need for a lock and increasing throughput.
+// There are users in the wild who create an excessive number of Counters so a 4x improvement in throughput at the expense of
+// creating GOMAXPROCS hasher values seems reasonable.

Review Comment:
   I'm OK with keeping it. It's pedagogical.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org