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.