You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2022/04/07 10:21:59 UTC

[GitHub] [helix] hmhagberg opened a new issue, #2020: ZkClientPathMonitor is inefficient

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: reviews-unsubscribe@helix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] narendly closed issue #2020: ZkClientPathMonitor is inefficient

Posted by GitBox <gi...@apache.org>.
narendly closed issue #2020: ZkClientPathMonitor is inefficient
URL: https://github.com/apache/helix/issues/2020


-- 
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: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org