Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Scripting Core 2.0.10
-
None
Description
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.