Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/338#discussion_r183430034
--- Diff: src/java/main/org/apache/zookeeper/ZKUtil.java ---
@@ -168,4 +169,41 @@ private static void visitSubTreeDFSHelper(ZooKeeper
zk, final String path,
return; // ignore
}
}
+
+ /**
+ * @param perms
+ * ACL permissions
+ * @return string representation of permissions
+ */
+ public static String getPermString(int perms) {
--- End diff --
Have you considered caching these values in some way?
I see 2 options to make this faster:
1. dynamic caching of already generated values,
2. static caching of all possible values in a static hashmap (32 possible
values if I'm not mistaken)
---