You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/07/29 07:00:06 UTC
[GitHub] [jackrabbit-oak] nfsantos commented on a diff in pull request #642: OAK-9873 Prefetch node states: composite node store support
nfsantos commented on code in PR #642:
URL: https://github.com/apache/jackrabbit-oak/pull/642#discussion_r932927645
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/prefetch/CacheWarming.java:
##########
@@ -48,6 +52,9 @@ public void prefetch(@NotNull Iterable<String> paths,
ids.add(id);
}
}
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Prefetch {} nodes", ids.size());
+ }
Review Comment:
Just out of curiosity, does calling `LOG.isDebugEnabled()` actually helps performance in this case? My understanding is that `LOG.debug()` will only do a check if debug is enabled and returns at once if so, so the cost of calling that method is only the cost of evaluating the arguments. In this case, `ids.size()` simply returns an int, so it's very cheap (probably it's even inlined by the JIT). Or is there any other reason for the if guard?
--
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: dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org