The layout of the test repository is presented below. Note, that appRoot and all its child nodes are versionable.
Consider the following query:
Every time a new direct child gets added to the appRoot, the previously provided query gets invoked ~ 5 more times.
|Node Index||Time (ms)||Invocation Count|
We can see that creation of the first node resulted in 59 invocations of the query provided above, whereas creation of the node number 200 resulted in 995 invocations. The query itself is fast, but the number of invocations increases the overall time a consumer waits for the node to be created, e.g. it took ~ 9 seconds to create a node number 200. The more child nodes we have, the slower the creation of the next child gets.
Is the behavior described above expected? For the record, I do understand how unbalanced the tree is, but our current data set (created by Jackrabbit 1.x) already contains a few outliers with over 400 children and now we are planning to maintain that data with ModeShape 5.x.