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 2010/08/05 22:10:21 UTC

[jira] Created: (MYFACES-2862) Improve efficiency of Application.createComponent(FacesContext,Resource) in production

Improve efficiency of Application.createComponent(FacesContext,Resource) in production
--------------------------------------------------------------------------------------

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


Profiler marks as hot spot method ClassUtils.classForName(fqcn) which is called from Application.createComponent(FacesContext,Resource)  during  restore view phase.

The reason is that in tested view are composite components and for each usage of them CompositeComponentResourceTagHandler
calls Application.createComponent(FacesContext,Resource) during VDL.buildView. Invocation of ClassUtils.classForName calls loadClass method on ClassLoader (Tomcat's WebappClassLoader.findResourceInternal in my case) and that is an expensive operation.


Something or maybe whole result of Application.createComponent should be cached in production mode. I did a simple cache attept and it saves ~15 ms in my test case with 6 composite components.






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


[jira] Updated: (MYFACES-2862) [PERF] Improve efficiency of Application.createComponent(FacesContext,Resource) in production

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

Leonardo Uribe updated MYFACES-2862:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.3-SNAPSHOT
         Assignee: Leonardo Uribe
           Status: Resolved  (was: Patch Available)

> [PERF] Improve efficiency of Application.createComponent(FacesContext,Resource) in production
> ---------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2862
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2862
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General, JSR-314
>    Affects Versions: 2.0.2-SNAPSHOT
>         Environment: myfaces trunk
>            Reporter: Martin Kočí
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.3-SNAPSHOT
>
>         Attachments: MYFACES-2862-CACHING-EXAMPLE.patch, MYFACES-2862.patch
>
>
> Profiler marks as hot spot method ClassUtils.classForName(fqcn) which is called from Application.createComponent(FacesContext,Resource)  during  restore view phase.
> The reason is that in tested view are composite components and for each usage of them CompositeComponentResourceTagHandler
> calls Application.createComponent(FacesContext,Resource) during VDL.buildView. Invocation of ClassUtils.classForName calls loadClass method on ClassLoader (Tomcat's WebappClassLoader.findResourceInternal in my case) and that is an expensive operation.
> Something or maybe whole result of Application.createComponent should be cached in production mode. I did a simple cache attept and it saves ~15 ms in my test case with 6 composite components.

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


[jira] Updated: (MYFACES-2862) [PERF] Improve efficiency of Application.createComponent(FacesContext,Resource) in production

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

Martin Kočí updated MYFACES-2862:
---------------------------------

    Status: Patch Available  (was: Open)

> [PERF] Improve efficiency of Application.createComponent(FacesContext,Resource) in production
> ---------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2862
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2862
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General, JSR-314
>    Affects Versions: 2.0.2-SNAPSHOT
>         Environment: myfaces trunk
>            Reporter: Martin Kočí
>         Attachments: MYFACES-2862-CACHING-EXAMPLE.patch, MYFACES-2862.patch
>
>
> Profiler marks as hot spot method ClassUtils.classForName(fqcn) which is called from Application.createComponent(FacesContext,Resource)  during  restore view phase.
> The reason is that in tested view are composite components and for each usage of them CompositeComponentResourceTagHandler
> calls Application.createComponent(FacesContext,Resource) during VDL.buildView. Invocation of ClassUtils.classForName calls loadClass method on ClassLoader (Tomcat's WebappClassLoader.findResourceInternal in my case) and that is an expensive operation.
> Something or maybe whole result of Application.createComponent should be cached in production mode. I did a simple cache attept and it saves ~15 ms in my test case with 6 composite components.

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