Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3848

JcrNodeResource takes too long and initializes too much too soon

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JCR Resource 2.3.8, API 2.8.0
    • Component/s: JCR
    • Labels:
      None

      Description

      In a performance test expected to reflect reasonably real-world conditions (50 concurrent users of a mixed load 'forum' type application) I found org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResource.JcrNodeResource(ResourceResolver, Node, ClassLoader) taking more than 20% of time used. The majority of this time was spent in setting the resource metadata and to a lesser extent the resource type.

      Because the metadata especially is not often accessed and even the resource type is not always accessed, delaying these initializations led to a noticeable performance improvement.

      The attached patch delays resourcetype lookup and metadata lookups until needed.

        Attachments

        1. SLING-3848-jsedding.patch
          15 kB
          Julian Sedding
        2. sling.jcr.resource.diff
          15 kB
          Rob Ryan
        3. sling.api.diff
          0.6 kB
          Rob Ryan

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              rryan@adobe.com Rob Ryan
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: