Avoid excessive String concatenation operations

Favor data.groupBy { it.SalesOrg } { it.Industry } { it.Prefix } { it.ProductHierarchy } over data.groupBy { it.SalesOrg + it.Industry + it.Prefix + it.ProductHierarchy }.

String concatenations may seem harmless at first glance; however, inside loops or in logics designed for high throughput, like Pricing APIs, it may become a performance bottleneck.

Here is a snippet showcasing the differences between each approach: Performance comparison between different groupBy opttions ($146) · Snippets · logic / avantor-logic · GitLab