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

Cache initial repository state to improve JCR_OAK performance

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

Details

    Description

      A lot of effort goes into preparing an Oak Mock repository from scratch: node types need to be registered, indexes need to be created, and all this happens over several commits. None of this work depends on the test case itself, so it will always result in the exact same repository state. We could take the root NodeState from the first repository we build, then build subsequent repositories on top of it, avoiding most of the redundant work. Commits can be relatively expensive even in memory, so each one we avoid can save a lot of time in the long term.

       

      This would require extending the contract between Testing Sling Mock and the ResourceResolverTypeAdapters, to add optional "make snapshot" and "build repo from snapshot" operations. For adapters that don't support them, we would keep rebuilding things from scratch.

      Attachments

        Issue Links

        Activity

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

          People

            sseifert Stefan Seifert
            Csaba Varga Csaba Varga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment