myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <martin.k...@aura.cz>
Subject Re: Myfaces vs. mojarra restore view performance
Date Wed, 04 Aug 2010 19:15:32 GMT
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? 


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?


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 <martin.koci@aura.cz>
> >         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čí
> >         
> >         
> >         
> >         
> >         
> > 
> > 
> 
> 
> 



Mime
View raw message