divijvaidya opened a new pull request, #13096: URL: https://github.com/apache/kafka/pull/13096
Clean up of different aspects on the scala code. Some are potential performance improvement and some are readability improvements. Example for type of changes are: 1. Merge consecutive filter calls to avoid creation of an intermediate collection 2. Don’t resort to pattern matching to check value existence. The simplified expression works faster. 3. For `option`, don’t emulate `exists` & other `monadic` functions using pattern matching. see: https://pavelfatin.com/scala-collections-tips-and-tricks/#options-processing 4. Don’t use map when result is ignored, use `foreach` instead. 5. Using `.lengthCompare(n) > 0)` instead of `.length()` reduces the complexity from O(length) to O(length min n) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org