You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2015/01/19 11:47:35 UTC
[jira] [Commented] (SLING-4314) The implementation of
RenderContext#resolveProperty can be slow for certain cases
[ https://issues.apache.org/jira/browse/SLING-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282381#comment-14282381 ]
Felix Meschberger commented on SLING-4314:
------------------------------------------
Oops. Sorry. Fixed this in Rev. 1652954:
My change to the patch caused NPE. So a another refactoring is needed for the findMethod method: Only return if the matched method is accepatble. Otherwise break out of the loop and fall down to throwing the NoSuchMethodException thus never returning null from findMethod.
[~radu.cotescu] Would you be able to validate ? Thanks.
> The implementation of RenderContext#resolveProperty can be slow for certain cases
> ---------------------------------------------------------------------------------
>
> Key: SLING-4314
> URL: https://issues.apache.org/jira/browse/SLING-4314
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Radu Cotescu
> Assignee: Felix Meschberger
> Fix For: Scripting Sightly Engine 1.0.0
>
> Attachments: SLING-4314_-_The_implementation_of_RenderContext_resolveProperty_can_be_slow_for_certain.patch
>
>
> The current implementation of {{org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl#resolveProperty}} is slow when the resolved methods of an object return {{null}} due to the fact that {{getField}} is called without a real reason.
> Instead, {{getField}} should be called only when a method is not found.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)