Hi, The current Jackrabbit implementation uses orderable child nodes by default, meaning nodes are returned in the same order as they are created. As an example, if I create the nodes /test/c, then /test/b, and then /test/a, and then read the node list, I will get them back in that same order. I'm wondering if this is really required (at all, and to be the default behavior). Specially if there are a lot of child nodes.
Instead of using the insertion order, I propose to sort the child node list alphabetically: /test/a, /test/b, /test/c - no matter in what order the nodes where created. This will allow an efficient lookup (using binary search), and for large child node lists (more than one thousand child nodes per node) modifications would be about twice as fast as using insertion order (plus it would need less disk space). Would it be a problem if Jackrabbit 3 sorts child nodes by name (always, or at least by default)? Another option would be to use (insertion) order until the child node list gets too large (for example 1000 elements), and from then on sort the child nodes by name (the previous ordering would then be lost). Regards, Thomas