[
https://issues.apache.org/jira/browse/SLING-10107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17275687#comment-17275687
]
Jörg Hoh edited comment on SLING-10107 at 1/31/21, 1:17 PM:
------------------------------------------------------------
Hi [~marett], I totally agree to your understanding. But right now I am not
sure if we have in a single, short-lived action multiple creations of
ResourceResolvers. Merging these into a single commit wouldn't be a problem,
and maybe they even belong together into a single "transaction".
Right now I don't have the intention to do that, I just wanted to know if it's
worth at all to do that investigation. And for that reason the PR contains a
new metric for the number of ResourceResolvers created there.
was (Author: joerghoh):
Hi [~marett], I totally agree to your understanding. But right now I am not
sure if we have in a single, short-lived action multiple creation of
ResourceResolvers. Merging these into a single commit wouldn't be a problem,
and maybe even belong together into a single "transaction".
Right now I don't have the intention to do that, I just wanted to know if it's
worth at all to do that investigation. And for that reason the PR contains a
new metric for the number of ResourceResolvers created there.
> Refactoring of creation of ResourceResolvers
> --------------------------------------------
>
> Key: SLING-10107
> URL: https://issues.apache.org/jira/browse/SLING-10107
> Project: Sling
> Issue Type: Improvement
> Components: Content Distribution
> Affects Versions: Content Distribution Journal Core 0.1.16
> Reporter: Jörg Hoh
> Priority: Major
>
> In the 2 classes {{Bookkepper}} and the {{Localstore}} the creation of
> ResourceResolvers is spread over multiple places, and also the number of
> methods, where ResourceResolvers are opened for obviously tiny operations is
> quite high.
> Therefor I refactored the creation of ResourceResolvers for the subservice
> bookkeeper (which is the majority of cases) and centralized the creation of
> it into a central supplier within the {{Bookkeeper}}. I also added a new
> Gauge metric to observe how often a new ResourceResolver is actually created.
> My gut feeling is, that the number of creations is (too) high; but before I
> start combining operations and reduce the number of ResourceResolver
> creations, I would like to understand if it's a problem at all.
> See
> https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/63
> for the PR
--
This message was sent by Atlassian Jira
(v8.3.4#803005)