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

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

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 5.1.0.Final
    • Fix Version/s: Future Releases
    • Component/s: JCR
    • Labels:
      None
    • Environment:

      Mac OS X 10.10.4, Apache Maven 3.3.3, Oracle Java 1.8.0_60, Oracle 11g DBMS

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                illia.khokholkov Illia Khokholkov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: