[ https://issues.apache.org/jira/browse/BEAM-10190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Cwik resolved BEAM-10190. ------------------------------ Fix Version/s: 2.23.0 Resolution: Fixed > Reduce cost of toString of MetricKey and MetricName > --------------------------------------------------- > > Key: BEAM-10190 > URL: https://issues.apache.org/jira/browse/BEAM-10190 > Project: Beam > Issue Type: Improvement > Components: sdk-java-core > Reporter: Yixing Zhang > Assignee: Yixing Zhang > Priority: P2 > Fix For: 2.23.0 > > Time Spent: 50m > Remaining Estimate: 0h > > Samza runner heavily uses MetricKey.toString() and MetricName.toString() to > update Samza metrics. We found that the toString methods have high CPU cost. > And according to this article: > [https://redfin.engineering/java-string-concatenation-which-way-is-best-8f590a7d22a8], > we should use "+" operator instead of String.format for string concatenation > for better performance. > We do see a 10% QPS gain in nexmark queries using Samza runner with the > change of using "+" operator. -- This message was sent by Atlassian Jira (v8.3.4#803005)