Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2630

Significant number of DB calls when adding a new node and versioning node hierachies

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Minor Minor
    • Future Releases
    • 5.1.0.Final
    • JCR
    • None

      Repository Layout

      The layout of the test repository is presented below. Note, that appRoot and all its child nodes are versionable.

      - jcrRoot
      -- appRoot
      --- node1
      --- ...
      --- nodeN
      

      Problem

      Consider the following query:

      SELECT CONTENT FROM MODESHAPE_REPOSITORY WHERE ID = ?
      

      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
      1 376 59
      2 429 64
      3 522 69
      50 2,433 302
      200 9,121 995

      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.

      Questions

      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.

      Notes

      The data presented here was obtained using YourKit profiler. The application that generated the load can be found here with some instructions located here.

              Unassigned Unassigned
              illia.khokholkov Illia Khokholkov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: