[
https://issues.apache.org/jira/browse/ARIES-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14711215#comment-14711215
]
John Ross commented on ARIES-1356:
----------------------------------
Double-check requires that the variable be volatile. Also, double-check is used
when you need to both read from and (possibly) write to the variable. We only
need to read it in getInstance.
I will most likely commit this in any case since it strikes me as an overall
improvement to the code, even if it may not have a significant performance
benefit.
> getInstance method on the core Activator shows up on jvisualvm sampling
> during performance analysis
> ---------------------------------------------------------------------------------------------------
>
> Key: ARIES-1356
> URL: https://issues.apache.org/jira/browse/ARIES-1356
> Project: Aries
> Issue Type: Improvement
> Components: Subsystem
> Affects Versions: subsystem-core-1.2.0, subsystem-2.0.1
> Environment: Java windows linux
> Reporter: Bas
> Assignee: John Ross
> Priority: Minor
> Labels: patch, performance
> Fix For: subsystem-core-1.2.0
>
> Attachments: aries-1356.patch, subsystem-activator-patch.txt
>
>
> The 'getInstance' method on the core Activator shows up on jvisualvm sampling
> during performance analysis.
> While doing performance analyses because of poor subsystem install
> performance while running 200 subsystems we encountered the 'getInstance'
> method in jvisualvm statistics. It is called so much that it actually cost 4
> seconds on the total process of installing two subsystems when 200 subsystems
> have been deployed already.
> While using the patch below we didn't notice it anymore in jvisualvm sampling.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)