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/11 22:02:48 UTC

[jira] [Created] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

[perf] review UIComponentBase.getRendererType 
----------------------------------------------

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


1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer

2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get

3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute

4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)



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

[jira] [Commented] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

Leonardo Uribe commented on MYFACES-3136:
-----------------------------------------

fixed as part of MYFACES-3488
                
> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             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-3136.patch
>
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

--
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] [Reopened] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

Leonardo Uribe reopened MYFACES-3136:
-------------------------------------

      Assignee: Leonardo Uribe  (was: Martin Kočí)
    
> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             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.1.0
>
>         Attachments: MYFACES-3136.patch
>
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

--
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] [Reopened] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

Leonardo Uribe reopened MYFACES-3136:
-------------------------------------


I checked this one again and even if the improvement works for all known jsf libraries, , according to JSF spec section 8 Rendering Model,this part is essential to implement "delegated implementation" pattern, so we can't do this optimization here. Instead, JSF developers could prevent this evaluation overriding this method directly on the created components, like trinidad does. In other words, it is valid to have a ValueExpression attached to "rendererType". Unfortunately I have to revert this change. Instead, we should minimize lookups to attribute map using other means, like directly on the renderers, as suggested on MYFACES-3237

> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             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
>             Fix For: 2.1.0
>
>         Attachments: MYFACES-3136.patch
>
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

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

       

[jira] [Resolved] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

Leonardo Uribe resolved MYFACES-3136.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.1.0)
                   2.1.7
                   2.0.13
    
> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             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-3136.patch
>
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

--
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] [Resolved] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

Martin Kočí resolved MYFACES-3136.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0-SNAPSHOT
         Assignee: Martin Kočí

patch committed to trunk svn rev. 1124213; checked trinidad, primefaces, richfaces and icefaces: they don't expect rendererType as valueExpression.

> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             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
>             Fix For: 2.1.0-SNAPSHOT
>
>         Attachments: MYFACES-3136.patch
>
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

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

[jira] [Commented] (MYFACES-3136) [perf] review UIComponentBase.getRendererType

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

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

Dev mailling list discussion: http://www.mail-archive.com/dev@myfaces.apache.org/msg53054.html

Result: change UIComponent.rendererType to StateHelper().get, it cannot have ValueExpression.


> [perf] review UIComponentBase.getRendererType 
> ----------------------------------------------
>
>                 Key: MYFACES-3136
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3136
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.1.0-SNAPSHOT
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Priority: Minor
>
> 1) method UIComponentBase.getRendererType is the most frequent, because all encodeBegin, getRendersChildren and encodeAll l try to locate renderer
> 2) getRendererType uses StateHelper.eval - but can be renderType ValueExpression? If not, change StateHelper.eval to StateHelper.get
> 3) should rendererType even be part of state saving? Each component I've ever seen has setRendererType("com.foo.renderer") in  constructor and/or VDL calls setRendererType() after calling Application.createComponent(): If rendererType is not part of state saving, replace StateHelper with attribute
> 4) Cache getRenderer(FacesContext context) result anyway (I'll create separate issue for this)

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