hmhagberg opened a new issue, #2020: URL: https://github.com/apache/helix/issues/2020
[`ZkClientPathMonitor`](https://github.com/apache/helix/blob/858038a0d4393109f3dfbb63c2f442b0f95fa50e/zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/metric/ZkClientPathMonitor.java) is used to monitor accesses to ZooKeeper and therefore is in call stack of all read and write operations Helix does. However, `ZkClientPathMonitor` matches paths using `String#matches` which is inefficient as it has to compile same regex again and again. If there is a lot of activity in the cluster, ZkClientPathMonitor often shows up near the top of the chart in both CPU samples and allocations in flight recordings. Using a precompiled `Pattern` would be an improvement. However, in this particular case regex can be replaced with a simple `String#contains` which is even faster. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
