Hi 2010/8/4 Martin Koci <[email protected]>
> Hi, > > today's results: > > myfaces from trunk + patchs from MYFACES-2854 : ~80 ms in > RestoreViewExecutor.exectute > > mojarra: ~70 ms in RestoreViewPhase.execute > > > major gain comes from solution which I suggest in MYFACES-2854: process > resource dependecies only for type, not for each instance of that type. > Can this solution have disadvantages? > > > Could you try with the patch proposed (MYFACES-2854-1.patch<https://issues.apache.org/jira/secure/attachment/12451185/MYFACES-2854-1.patch>) ? I think the solution proposed is not taking into consideration that in a single request, multiple views could be built (for example when there is a redirect on PreRenderViewEvent). Now the slowest part of restore view phase is creation of composite > components during buildView() - > CompositeComponentResourceTagHandler.createComponent(FaceletContext) > leads to invovations of Tomcat's > WebappClassLoader.findResourceInternal(String, String). Probably > composite components should be cached in production stage? > > In theory, FaceletFactory cache them, isn't it? regards, Leonardo Uribe > > Regards, > > Martin Kočí > > Martin Koci píše v Po 02. 08. 2010 v 22:20 +0200: > > Hi, > > > > quick results: yourkitprofiler marks as hot spot > > UiViewRoot.addComponentResource (3381 invocation count) - that method > > itself creates 5 710 511 invocations of AbstractIterator.next() > > > > Reason probably is that I have custom renderer for UInput with > > @ResourceDependencies(...many @ResourceDependecy here). > > > > All invocations comes from > > > org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply > recursively during restore view - VDL.buildView. > > > > Solution: @ResourceDependencies is static structure and cannot change > > during lifecycle - call addComponentResource for particular type of > > component (renderer, validator, ...) only once per one lifecycle ? > > > > > > Thanks, > > > > Martin Kočí > > > > Jan-Kees van Andel píše v Po 02. 08. 2010 v 19:18 +0200: > > > Hey, > > > > > > > > > I'm very interested in the details behind those 750ms. Can you post > > > the hotspots? Like: number of invocations, ms. self time and ms. total > > > time. > > > > > > > > > Thanks. > > > > > > > > > Regards, > > > Jan-Kees > > > > > > > > > 2010/8/2 Martin Koci <[email protected]> > > > Hi, > > > > > > our profiling results show that myfaces are significantly > > > slower in > > > restore view phase: > > > > > > com.sun.faces.... LifeCycle .. restoreView : 80 ms > > > > > > o.a.m.RestoreViewExecutor : 750ms! > > > > > > This result is perfectly reproducible in our case. I profile > > > it on a > > > application real application - I cannot post test case here. > > > > > > Configuration: myfaces or mojarra from trunk, partial state > > > saving, a > > > view with more than 200 UIInput components. > > > > > > > > > Is it a known problem? I will provide more detailed profiling > > > results > > > later. > > > > > > Regards, > > > > > > Martin Kočí > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
