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 2010/04/06 11:09:34 UTC

[jira] Created: (SLING-1473) Resolve script resource lazy

Resolve script resource lazy
----------------------------

                 Key: SLING-1473
                 URL: https://issues.apache.org/jira/browse/SLING-1473
             Project: Sling
          Issue Type: Improvement
          Components: Scripting
    Affects Versions: Scripting Core 2.0.10
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: Scripting Core 2.0.12


The script implementations use the SlingScript.getScriptResource().getPath() as a unique key for the script. The script resource is resolved in the current user context. This results in unnecessary resolutions during script executions just to get the path of the script - especially with a jcr backed resource this is quiet expensive.
Therefore we should rather use a lazy resource implementation which directly responds to getResourcePath() for getScriptResource(). Only if other methods of the Resource interface are used, the resource should be resolved.
First test showed a hugh performance increase of a lot of scripts are used to render a single request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-1473) Resolve script resource lazy

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-1473.
-----------------------------------


> Resolve script resource lazy
> ----------------------------
>
>                 Key: SLING-1473
>                 URL: https://issues.apache.org/jira/browse/SLING-1473
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.10
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Scripting Core 2.0.14
>
>
> The script implementations use the SlingScript.getScriptResource().getPath() as a unique key for the script. The script resource is resolved in the current user context. This results in unnecessary resolutions during script executions just to get the path of the script - especially with a jcr backed resource this is quiet expensive.
> Therefore we should rather use a lazy resource implementation which directly responds to getResourcePath() for getScriptResource(). Only if other methods of the Resource interface are used, the resource should be resolved.
> First test showed a hugh performance increase of a lot of scripts are used to render a single request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-1473) Resolve script resource lazy

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-1473.
-------------------------------------

    Resolution: Fixed

Added a lazy resource implementation in revision 931058

> Resolve script resource lazy
> ----------------------------
>
>                 Key: SLING-1473
>                 URL: https://issues.apache.org/jira/browse/SLING-1473
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.10
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Scripting Core 2.0.12
>
>
> The script implementations use the SlingScript.getScriptResource().getPath() as a unique key for the script. The script resource is resolved in the current user context. This results in unnecessary resolutions during script executions just to get the path of the script - especially with a jcr backed resource this is quiet expensive.
> Therefore we should rather use a lazy resource implementation which directly responds to getResourcePath() for getScriptResource(). Only if other methods of the Resource interface are used, the resource should be resolved.
> First test showed a hugh performance increase of a lot of scripts are used to render a single request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.