Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
Description
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.
Attachments
Issue Links
- links to