Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1473

Resolve script resource lazy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Scripting Core 2.0.10
    • Scripting Core 2.0.14
    • Scripting
    • 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.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            cziegeler Carsten Ziegeler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: