[
https://issues.apache.org/jira/browse/OAK-11383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911983#comment-17911983
]
Marcel Reutegger commented on OAK-11383:
----------------------------------------
Proposed change in https://github.com/apache/jackrabbit-oak/pull/1975
This reduces the time for 1M look ups of statistics that do not correspond to a
RepositoryStatistics.Type from 1200ms to 2ms on my machine.
> Improve performance of DefaultStatisticsProvider
> ------------------------------------------------
>
> Key: OAK-11383
> URL: https://issues.apache.org/jira/browse/OAK-11383
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core-spi
> Reporter: Marcel Reutegger
> Assignee: Marcel Reutegger
> Priority: Minor
>
> DefaultStatisticsProvider maintains a cache of previously accessed
> statistics, but on each lookup tries to get the RepositoryStatistics.Type for
> the stats name. This is particularly expensive when the name does not
> correspond to one of those well known types.
> RepositoryStatistics.Type.getType(String) does an Enum.valueOf() and catches
> the IllegalArgumentException when there is no such type.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)