Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Event 4.2.2
-
None
Description
I found in a number of occurences in the Sling Event code this pattern:
ResourceHelper.getOrCreateResource(resolver, newPath, props); resolver.delete(jobResource); resolver.commit();
and the getOrCreateResource is internally doing a commit on the resolver (autoCommit = true). So in the end there are 2 commits while only a single commit would be sufficient.
Removing these "double" commits could avoid a few write operations on the repository.