[ 
https://issues.apache.org/jira/browse/SLING-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836068#comment-17836068
 ] 

Stefan Seifert commented on SLING-12266:
----------------------------------------

ah, ok. there was some need form other sling modules to have a slightly newer 
version from oak in sling-mock-oak than 1.22, so we are currently between 
chairs of supporting the "old and the new world". usually, the actual version 
that is used in the unit tests should be controlled by the project environment 
e.g. when using [https://wcm.io/tooling/maven/aem-dependencies.html] for either 
AEMaaCS or AEM 6.5, so this is a bit of an academic discussion. of course, 
there may be projects that to not care about that dependency management and end 
up with 1.44. we might think about a way to ensure compatibility with different 
old and new versions in CI and use a newer version in the POM.

however, this is off-topic for this ticket.

[~Csaba Varga] it would be great if you can remove the makeJcr optimization 
then we can merge the PRs.

 

> Cache initial repository state to improve JCR_OAK performance
> -------------------------------------------------------------
>
>                 Key: SLING-12266
>                 URL: https://issues.apache.org/jira/browse/SLING-12266
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>    Affects Versions: Testing Sling Mock 3.4.18
>            Reporter: Csaba Varga
>            Assignee: Stefan Seifert
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to