You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2013/11/15 22:07:21 UTC
[jira] [Commented] (OAK-1193) AbstractTree.getChildNodeCount()
should not actively filter out hidden names
[ https://issues.apache.org/jira/browse/OAK-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824092#comment-13824092 ]
Jukka Zitting commented on OAK-1193:
------------------------------------
bq. it should propagate the hidden-filtering down to node builder
The idea behind hidden content is that it's visible through the low-level NodeState API, so things like commit hooks and index lookups can use the information. Such content is hidden at the Tree API to prevent it from leaking to higher-level clients. Thus such filtering should IMO not happen in a NodeBuilder.
bq. slow
How slow? Can this be a performance bottleneck for a real-world use case?
bq. not extensible
At some point earlier we discussed putting *all* hidden content under one special "{{:hidden}}" child node, which would nicely address any potential slowness (only one {{hasChildNode}} check needed vs. a full scan of all child nodes that we did at the time) and would allow any future components to add new types of hidden data. The current {{INTERNAL_NODE_NAMES}} solution is a partial implementation of that idea; it addresses the O\(n) performance we had earlier, but requires that all names of hidden data are known in advance.
> AbstractTree.getChildNodeCount() should not actively filter out hidden names
> ----------------------------------------------------------------------------
>
> Key: OAK-1193
> URL: https://issues.apache.org/jira/browse/OAK-1193
> Project: Jackrabbit Oak
> Issue Type: Bug
> Reporter: Tobias Bocanegra
> Assignee: Tobias Bocanegra
>
> {code}
> long count = nodeBuilder.getChildNodeCount(max);
> if (count > 0) {
> for (String name : INTERNAL_NODE_NAMES) {
> if (nodeBuilder.hasChildNode(name)) {
> count--;
> }
> }
> }
> {code}
> Checks {{INTERNAL_NODE_NAMES}} which is slow and not extensible. it should propagate the hidden-filtering down to node builder.
--
This message was sent by Atlassian JIRA
(v6.1#6144)