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

Ate Douma commented on RAVE-838:
--------------------------------

I agree we better/best let the persistence engine (JPA) handle caching when 
possible.

I just traced one page render request,with only a single widget on that page 
and found it invokes the WigetRepository 4x to load that single Widget:
 - PageController: storing a list of widgets in the modelMap
 - DefaultRenderService: called from RegionWidgetTag needing the Widget type to 
determine the concrete WidgetRenderer
 - OpenSocialWidgetRenderer: called from DefaultRenderService needing the 
Widget type to validate it its capable of rendering it
 - EncryptedBlobSecurityTokenService: called from OpenSocialWidgetRenderer 
needing the Widget URL for the regionwidget script block

Note that this single page request now takes about 14 seconds (which is much 
better than yesterdays 40 seconds range). The tested widget is the 'static' 
CurrentSchedule widget (e.g. doesn't add any real overhead itself).
When I add a second widget to the page (Favorite Websites, adding 
CurrentSchedule twice causing other problems), the page rendering time goes up 
21 sec.
And with zero widgets on the page the render time goes down to about 7 seconds.
Based on this (too) trivial testing, it seems a single retrieval of a Widget 
through the WidgetRepository takes about 7/4 = ~1.75 seconds. Which IMO is way 
too slow (mildly stated).

So, regardless caching or not, overall persistence manager object access seems 
way too slow anyway.
Caching can and will definitely help, as will be reducing obvious redundant 
retrieval within our own code.
But IMO the problem lies deeper than that. In the (new) model structure and 
mapping, the JPA engine configuration, or maybe both. 
                
> Performance problems after model-split merge
> --------------------------------------------
>
>                 Key: RAVE-838
>                 URL: https://issues.apache.org/jira/browse/RAVE-838
>             Project: Rave
>          Issue Type: Bug
>    Affects Versions: 0.17
>            Reporter: Chris Geer
>            Assignee: Chris Geer
>             Fix For: 0.17
>
>
>  - WidgetServer/Repository.get is being called much more frequently with the 
> RegionWidget/Widget split.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to