You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/05/20 08:03:39 UTC
[jira] [Closed] (SLING-2927) Wasted work in
ValidateVisitor.isExpression()
[ https://issues.apache.org/jira/browse/SLING-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-2927.
-----------------------------------
> Wasted work in ValidateVisitor.isExpression()
> ---------------------------------------------
>
> Key: SLING-2927
> URL: https://issues.apache.org/jira/browse/SLING-2927
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Environment: any
> Reporter: Adrian Nistor
> Assignee: Carsten Ziegeler
> Labels: patch, performance
> Fix For: Scripting JSP 2.1.0
>
> Attachments: patch.diff
>
>
> The problem appears in version 6 and in revision 1495454. I attached
> a two-line patch that fixes it.
> In method "ValidateVisitor.isExpression", the loop over "nodes" should
> break immediately after "elExpression" is set to "true". All the
> iterations after "elExpression" is set to "true" do not perform any
> useful work, at best they just set "elExpression" again to "true".
> 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.2#6252)