[ 
https://issues.apache.org/jira/browse/SLING-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14209771#comment-14209771
 ] 

Stefan Seifert commented on SLING-4112:
---------------------------------------

Completed: At revision: 1639323  

i commited the changes from the branch to the trunk.

open points:
* review if we should add some more specific unit tests for the new classes 
(although they are already tested indirectly by the other tests)
* update documentation concerning the SPI addition

> Sling Models: Optimize performance when read sling models annotations
> ---------------------------------------------------------------------
>
>                 Key: SLING-4112
>                 URL: https://issues.apache.org/jira/browse/SLING-4112
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: Sling Models Implementation 1.1.0
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>            Priority: Minor
>              Labels: models
>             Fix For: Sling Models Impl 1.2.0
>
>         Attachments: 141028_adaptto_jprofiler_slingmodels.gif, 
> 141028_adaptto_jprofiler_slingmodels_getannotation.gif, 
> 141030_jmeter_with_models_tuning.gif, 
> 141030_jmeter_without_models_tuning.gif, 
> 141030_jprofiler_with_models_tuning_models.gif, 
> 141030_jprofiler_with_models_tuning_total_grouped.gif, 
> 141030_jprofiler_without_models_tuning_models.gif, 
> 141030_jprofiler_without_models_tuning_total_grouped.gif
>
>
> i did some first performance tests with a sling application that makes 
> intensive usage of sling models to see where potential hotspots are that cost 
> performance, esp. in area of sling models.
> attached is a filtered view of a jprofile session showing only the method 
> calls inside sling models implementation:
> [^141028_adaptto_jprofiler_slingmodels.gif]
> a good part of performance is spent on inspection the annotations of the 
> sling models classes, a call graph of the first method: 
> [^141028_adaptto_jprofiler_slingmodels_getannotation.gif]
> i think this is especially the case because this inspection takes place on 
> each adaptTo() call, although the underlying model class never changes when 
> the OSGi bundle stays in place.
> it should be possible to come up with an optimization caching the inspection 
> results (which annotations exist on which fields/methods/types with which 
> parameters), and doing only the injection part on each adaptTo() invocation. 
> if the bundle changes the cache has to be cleared.
> i will think about it the next days and perhaps come up with an 
> implementation proposal.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to