jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCRVLT-53) vlt: with many child nodes, NodeNameList.restoreOrder is very slow with Oak
Date Tue, 08 Jul 2014 13:49:04 GMT

    [ https://issues.apache.org/jira/browse/JCRVLT-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14054942#comment-14054942

Jukka Zitting commented on JCRVLT-53:

I think we should make ~10k orderable child nodes still work reasonably well, as such scale
is still possible also with Jackrabbit 2.x. But I wouldn't worry too much about scaling to
100k orderable child nodes or higher. At that point we should just tell the user to make their
content unordered instead of us bending backwards to support that use case.

> vlt: with many child nodes, NodeNameList.restoreOrder is very slow with Oak
> ---------------------------------------------------------------------------
>                 Key: JCRVLT-53
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-53
>             Project: Jackrabbit FileVault
>          Issue Type: Improvement
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>         Attachments: JCR-3793.patch, ReorderTest.java
> The method org.apache.jackrabbit.vault.fs.api.NodeNameList.restoreOrder re-orders orderable
child nodes by using Node.orderBefore. This is very slow if there are many child nodes, specially
with Oak (minutes for 10'000 nodes, while only about 1 second for Jackrabbit 2.x).
> [~tripod], I wonder if a possible solution is to first check whether re-ordering is needed?
For example using:
> {noformat}
>     boolean isOrdered(ArrayList<String> names, Node parent)
>             throws RepositoryException {
>         NodeIterator it1 = parent.getNodes();
>         for (Iterator<String> it2 = names.iterator(); it2.hasNext();) {
>             if (!it1.hasNext() || !it1.nextNode().getName().equals(it2.next())) {
>                 return false;
>             }
>         }
>         return !it1.hasNext();
>     }
> {noformat}

This message was sent by Atlassian JIRA

View raw message