[ 
https://issues.apache.org/jira/browse/MYFACES-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713282#action_12713282
 ] 

Leonardo Uribe commented on MYFACES-2156:
-----------------------------------------

I have reviewed org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase, 
and based on that code a patch was attached. Theorically just one thread add 
all renderers at start, but it seems that HtmlRenderKitImpl does not implements 
purgeRenderKit method called by FacesConfiguration to reload configuration 
(param org.apache.myfaces.CONFIG_REFRESH_PERIOD).

> Performance improvement in HtmlRenderKitImpl
> --------------------------------------------
>
>                 Key: MYFACES-2156
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2156
>             Project: MyFaces Core
>          Issue Type: Improvement
>    Affects Versions: 1.1.6
>            Reporter: Philipp Schoepf
>            Priority: Minor
>         Attachments: MYFACES-2156.patch
>
>
> we did some profiling in our project and found out that HtmlRenderKitImpl 
> creates some amount of transient object garbage when getRenderer is called:
> Self   8005   0,00   7,92           0     2894448   
> J:org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.getRenderer(Ljava/lang/String;Ljava/lang/String;)Ljavax/faces/render/Renderer;
>    Child  24015   0,00   4,69           0     1714064   
> J:java/lang/StringBuffer.append(Ljava/lang/String;)Ljava/lang/StringBuffer;
> The above values were recorded with just 2 request to a page with many 
> components - 2.8MB of transient objects were created by 8005 calls to 
> getRenderer.
> I assume that this is due to the "keying" currenlty implemented which always 
> creates a concatinated string. I guess using a Map<String, Map<String, 
> Renderer>> doubleMap could improve the performance here since string creation 
> for keying would not be nessary.
> Might also touch 1.2 and 2.0.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to