[
https://issues.apache.org/jira/browse/SLING-4240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14245307#comment-14245307
]
Radu Cotescu commented on SLING-4240:
-------------------------------------
The attached patch ([^SLING-4240.patch]) combined with the patch attached to
SLING-4241 greatly improves performance of the Sightly engine. Using a test
very similar to what's mentioned in SLING-4093 issue's description I've reached
to the following performance ratios:
1. JSP vs Sightly with Java Use-API: Sightly slower than JSP by 1.5 times on
avg.
2. JSP vs Sightly with JS Use-API: Sightly slower than JSP by 4-5 times on
avg., mostly due to Rhino
> Improve Sightly engine performance
> ----------------------------------
>
> Key: SLING-4240
> URL: https://issues.apache.org/jira/browse/SLING-4240
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Reporter: Radu Cotescu
> Fix For: Scripting Sightly Engine 1.0.0
>
> Attachments: SLING-4240.patch
>
>
> Several areas of the engine's implementation can be improved to greatly
> reduce compilation & rendering times:
> * rely on the dynamic classloader's cache rather than compile Use-API POJOs
> all the time
> * reduce the number of repository reads in favour of events for deducing if a
> Sightly script or Use-API POJO needs to be recompiled
> * use a per thread admin resource resolver instead of creating many resolvers
> in various components during the lifecycle of a request
> * optimise the {{RenderContext}} implementation code that handles object
> methods and fields detection
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)