You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kočí (JIRA)" <de...@myfaces.apache.org> on 2011/05/16 18:50:47 UTC

[jira] [Created] (MYFACES-3150) [perf] buildView: review usage of "facelets.FACET_NAME"

[perf] buildView: review usage of "facelets.FACET_NAME"
-------------------------------------------------------

                 Key: MYFACES-3150
                 URL: https://issues.apache.org/jira/browse/MYFACES-3150
             Project: MyFaces Core
          Issue Type: Improvement
          Components: General
    Affects Versions: 2.1.0-SNAPSHOT
         Environment: myfaces core trunk
            Reporter: Martin Kočí
            Priority: Minor


Consider 1000 components in view without any f:facet. 

During VDL.buildView Facelets call  for each component ComponentHandler.getFacetName(FaceletContext, UIComponent) and that creates 3 calls of Map.get():

1) _ComponentAttributesMap.getPropertyDescriptor(String)
2) _ComponentAttributesMap.getUnderlyingMap().get()
3) UIComponent.getValueExpression(String)

3000 "empty" invocations in buildView withnout match.

Suggestions:
* do not use Component.attribute for that marker (comes from FacetHandler)
* replace map.get calls with property for performance reasons
* use a stack or property on AbstractFaceletContext if possible

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (MYFACES-3150) [perf] buildView: review usage of "facelets.FACET_NAME"

Posted by "Leonardo Uribe (Resolved) (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3150.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.7
                   2.0.13
         Assignee: Leonardo Uribe  (was: Martin Kočí)

I committed an alternative solution, following the change done in MYFACES-3488: add a field on UIComponentBase and store there that value. Since it is a transient field for facelets compiler use only, we don't need to worry about store it into the state. The solution involving use an structure on the compiler side is too complex, so after some meditation I discarded it.
                
> [perf] buildView: review usage of "facelets.FACET_NAME"
> -------------------------------------------------------
>
>                 Key: MYFACES-3150
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3150
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.1.0-SNAPSHOT
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 2.0.13, 2.1.7
>
>         Attachments: MYFACES-3150-v1.patch
>
>
> Consider 1000 components in view without any f:facet. 
> During VDL.buildView Facelets call  for each component ComponentHandler.getFacetName(FaceletContext, UIComponent) and that creates 3 calls of Map.get():
> 1) _ComponentAttributesMap.getPropertyDescriptor(String)
> 2) _ComponentAttributesMap.getUnderlyingMap().get()
> 3) UIComponent.getValueExpression(String)
> 3000 "empty" invocations in buildView withnout match.
> Suggestions:
> * do not use Component.attribute for that marker (comes from FacetHandler)
> * replace map.get calls with property for performance reasons
> * use a stack or property on AbstractFaceletContext if possible

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3150) [perf] buildView: review usage of "facelets.FACET_NAME"

Posted by "Leonardo Uribe (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223942#comment-13223942 ] 

Leonardo Uribe commented on MYFACES-3150:
-----------------------------------------

Unfortunately the patch will not work, because there is an association between the parent component and the facet name, and then a check for a facet name is used to decide if the component is added as a child or as a facet child. With a stack, that connection get lost and at the end the tree will not be built correctly.
                
> [perf] buildView: review usage of "facelets.FACET_NAME"
> -------------------------------------------------------
>
>                 Key: MYFACES-3150
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3150
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.1.0-SNAPSHOT
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3150-v1.patch
>
>
> Consider 1000 components in view without any f:facet. 
> During VDL.buildView Facelets call  for each component ComponentHandler.getFacetName(FaceletContext, UIComponent) and that creates 3 calls of Map.get():
> 1) _ComponentAttributesMap.getPropertyDescriptor(String)
> 2) _ComponentAttributesMap.getUnderlyingMap().get()
> 3) UIComponent.getValueExpression(String)
> 3000 "empty" invocations in buildView withnout match.
> Suggestions:
> * do not use Component.attribute for that marker (comes from FacetHandler)
> * replace map.get calls with property for performance reasons
> * use a stack or property on AbstractFaceletContext if possible

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3150) [perf] buildView: review usage of "facelets.FACET_NAME"

Posted by "Martin Kočí (Commented JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210456#comment-13210456 ] 

Martin Kočí commented on MYFACES-3150:
--------------------------------------

actually it creates 4000 "empty" invocations of Map.get, because UIComponent.getValueExpression itself calls Map.get 2x:
1) bindings = getStateHelper(). get(PropertyKeys.bindings);
2) return (ValueExpression) bindings.get(name);




                
> [perf] buildView: review usage of "facelets.FACET_NAME"
> -------------------------------------------------------
>
>                 Key: MYFACES-3150
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3150
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.1.0-SNAPSHOT
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>            Priority: Minor
>
> Consider 1000 components in view without any f:facet. 
> During VDL.buildView Facelets call  for each component ComponentHandler.getFacetName(FaceletContext, UIComponent) and that creates 3 calls of Map.get():
> 1) _ComponentAttributesMap.getPropertyDescriptor(String)
> 2) _ComponentAttributesMap.getUnderlyingMap().get()
> 3) UIComponent.getValueExpression(String)
> 3000 "empty" invocations in buildView withnout match.
> Suggestions:
> * do not use Component.attribute for that marker (comes from FacetHandler)
> * replace map.get calls with property for performance reasons
> * use a stack or property on AbstractFaceletContext if possible

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira