[
https://issues.apache.org/jira/browse/SLING-2928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler updated SLING-2928:
------------------------------------
Priority: Minor (was: Major)
> Wasted work in LaunchpadConfigInstaller.isActive()
> --------------------------------------------------
>
> Key: SLING-2928
> URL: https://issues.apache.org/jira/browse/SLING-2928
> Project: Sling
> Issue Type: Bug
> Components: Launchpad
> Environment: any
> Reporter: Adrian Nistor
> Assignee: Carsten Ziegeler
> Priority: Minor
> Labels: patch, perfomance
> Fix For: Launchpad Installer 1.2.2
>
> Attachments: patch.diff
>
>
> The problem appears in revision 1495454. I attached a one-line patch
> that fixes it.
> In method "LaunchpadConfigInstaller.isActive", the loop over
> "runModes" should break immediately after "active" is set to "false".
> All the iterations after "active" is set to "false" do not perform any
> useful work, at best they just set "active" again to "false".
> Method "isLive" in class "ResourceResolverContext" has a similar loop
> (over "dynamicProviders"), and this loop breaks immediately after
> "result" is set to "false", just like in the proposed patch. Other
> methods (e.g., "FactoryPreconditions.checkPreconditions",
> "JspUtil.checkAttributes", "EclipseJavaCompiler.compile",
> "SecondPassVisitor.appendPageDirective") also have similar loops with
> similar breaks, just like in the proposed patch.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)