You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Satya Deep Maheshwari <m....@gmail.com> on 2017/10/09 07:12:02 UTC

[job]Why are multiple commits needed when writing a job to the resource tree?

Hi

I was investigating the number of commits done while adding a sling job via
AEM workflow for performance implications. I see that while writing the job
to the resource tree, there's a commit made at each level of the tree when
creating the resource. See [1], [2] .This can inadvertently lead to
multiple commits if the resource tree is not present and all the levels
need to be created.

Is there a specific reason for which the commit need to be done at each
step? Can this be reduced to a singular commit after the whole resource
tree is created? Are there any implication of this which I am unable to see?


-- 
Regards
Satya Deep

[1] - https://github.com/apache/sling/blob/trunk/bundles/
extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/
JobManagerImpl.java#L641
[2] - https://github.com/apache/sling/blob/trunk/bundles/
extensions/event/resource/src/main/java/org/apache/sling/event/impl/support/
ResourceHelper.java#L273

Re: [job]Why are multiple commits needed when writing a job to the resource tree?

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Monday 09 October 2017 12:42:02 Satya Deep Maheshwari wrote:
> Hi

Hi,

> I was investigating the number of commits done while adding a sling job via
> AEM workflow for performance implications. I see that while writing the job
> to the resource tree, there's a commit made at each level of the tree when
> creating the resource. See [1], [2] .This can inadvertently lead to
> multiple commits if the resource tree is not present and all the levels
> need to be created.
> 
> Is there a specific reason for which the commit need to be done at each
> step? Can this be reduced to a singular commit after the whole resource
> tree is created? Are there any implication of this which I am unable to see?

did you have a look at SLING-6782?

Regards,
O.


Re: [job]Why are multiple commits needed when writing a job to the resource tree?

Posted by Satya Deep Maheshwari <m....@gmail.com>.
Sending again. Anyone?

On Mon, Oct 9, 2017 at 12:42 PM, Satya Deep Maheshwari <
m.satyadeep@gmail.com> wrote:

> Hi
>
> I was investigating the number of commits done while adding a sling job
> via AEM workflow for performance implications. I see that while writing the
> job to the resource tree, there's a commit made at each level of the tree
> when creating the resource. See [1], [2] .This can inadvertently lead to
> multiple commits if the resource tree is not present and all the levels
> need to be created.
>
> Is there a specific reason for which the commit need to be done at each
> step? Can this be reduced to a singular commit after the whole resource
> tree is created? Are there any implication of this which I am unable to see?
>
>
> --
> Regards
> Satya Deep
>
> [1] - https://github.com/apache/sling/blob/trunk/bundles/extensi
> ons/event/resource/src/main/java/org/apache/sling/event/
> impl/jobs/JobManagerImpl.java#L641
> [2] - https://github.com/apache/sling/blob/trunk/bundles/extensi
> ons/event/resource/src/main/java/org/apache/sling/event/
> impl/support/ResourceHelper.java#L273
>