Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2878

Allow Configuration of CachingPathResolver cache size

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.1, 2.2.2
    • None
    • jackrabbit-spi-commons
    • None

    Description

      It would be nice to be able to configure/tune the cache size of the CachingPathResolver and possibly the CachingNameResolver. During some profiling with a client using sling/CRX for their site we could see that the CachingPathResolver was not performing very well.

      For example, this stacktrace showed up as the top item in the profiler output:
      org.apache.jackrabbit.spi.commons.name.NameFactoryImpl$NameImpl.init(NameFactoryImpl.java:108)
      org.apache.jackrabbit.spi.commons.name.NameFactoryImpl$NameImpl.init(NameFactoryImpl.java:85)
      org.apache.jackrabbit.spi.commons.name.NameFactoryImpl.create(NameFactoryImpl.java:54)
      org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:191)
      org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
      org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:284)
      org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:120)
      org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver.getQPath(ParsingPathResolver.java:90)
      org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:98)
      org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:77)
      org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQPath(DefaultNamePathResolver.java:82)
      org.apache.jackrabbit.core.SessionImpl.getQPath(SessionImpl.java:729)
      org.apache.jackrabbit.core.SessionImpl.itemExists(SessionImpl.java:895)
      org.apache.sling.jcr.base.internal.PooledSession.itemExists(PooledSession.java:236)
      org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.itemExists(JcrResourceProvider.java:164)
      org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.createResource(JcrResourceProvider.java:131)
      org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:76)
      org.apache.sling.jcr.resource.internal.helper.WrappedResourceProvider.getResource(WrappedResourceProvider.java:49)
      org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry.getInternalResource(ResourceProviderEntry.java:460)
      org.apache.sling.jcr.resource.internal.helper.ResourceProviderEntry.getResource(ResourceProviderEntry.java:137)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getResourceInternal(JcrResourceResolver.java:713)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getResource(JcrResourceResolver.java:432)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getResource(JcrResourceResolver.java:454)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getProperty(JcrResourceResolver.java:738)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getProperty(JcrResourceResolver.java:740)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.getChildInternal(JcrResourceResolver.java:693)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.resolveInternal(JcrResourceResolver.java:638)
      org.apache.sling.jcr.resource.internal.JcrResourceResolver.resolve(JcrResourceResolver.java:216)
      org.apache.sling.engine.impl.request.RequestData.initResource(RequestData.java:198)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            akhoury Andrew Khoury

            Dates

              Created:
              Updated:

              Slack

                Issue deployment