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 Koci <ma...@gmail.com> on 2010/09/14 23:05:42 UTC
Re: Myfaces vs. mojarra restore view performance
Hi,
please review https://issues.apache.org/jira/browse/MYFACES-2922 and
apply if possible.
Thanks,
Kočičák
Leonardo Uribe píše v Pá 06. 08. 2010 v 13:07 -0500:
> Hi
>
> 2010/8/6 Martin Koci <ma...@aura.cz>
> Hi,
>
>
> is it possible to cache inspected classes in
> RequestViewContext? I did
> something like that:
>
> if (isProduction && !
> requestViewContext.isAlreadyInspected(inspectedClass)) {
>
> _handleListenerForAnnotations(context, inspected,
> inspectedClass, component, isProduction);
>
> _handleResourceDependencyAnnotations(context,
> inspectedClass, component, isProduction);
>
> requestViewContext.setAsProcessed(inspectedClass);
> }
>
> in _handleAnnotations and it reduces restore view time to
> 30-40 ms.
>
>
> It is necessary to apply @ListenerFor annotations on every component
> that has registered
> it in the view. The reason why we can cache @ResourceDependency is
> this annotation
> cause a component resource to be added, and that one will be always
> the "same".
>
> regards,
>
> Leonardo
>
>
> regards,
>
> Martin Kočí
>
> Leonardo Uribe píše v Čt 05. 08. 2010 v 15:56 -0500:
>
> > Hi
> >
> > Ok, good to know that. I closed MYFACES-2854. Maybe on
> MYFACES-2862 we
> > can use FacesContext.isProjectStage(ProjectStage).
> >
> > regards,
> >
> > Leonardo
> >
> > 2010/8/5 Martin Koci <ma...@aura.cz>
> > Hi,
> >
> > success!
> >
> > myfaces + MYFACES-2854-2.patch + MYFACES-2862 = ~ 70
> ms in
> > restore view
> > phase. It was *750 ms* before.
> >
> > Thanks,
> >
> > Martin Kočí
> >
> > Leonardo Uribe píše v St 04. 08. 2010 v 22:09 -0500:
> >
> > > Hi
> > >
> > > I implemented a proposal for this one on
> > MYFACES-2854-2.patch using
> > > the suggestion
> > > proposed (do not apply ResourceDependency if it
> was already
> > > processed). I hope that
> > > patch solve the problem.
> > >
> > > regards,
> > >
> > > Leonardo
> > >
> >
> >
> >
> >
>
>
>
>
Re: Myfaces vs. mojarra restore view performance
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
Yes, sure!. Give me some time, right now I'm doing some stuff related to
@ListenerFor annotation, so as soon as I'm done I'll take a look.
regards,
Leonardo
2010/9/30 Martin Koci <ma...@gmail.com>
> Hi,
>
> Leonardo, can you please review :
> https://issues.apache.org/jira/browse/MYFACES-2922
> https://issues.apache.org/jira/browse/MYFACES-2862
>
> and apply them if they are suitable?
>
>
> Thanks,
>
> Kočičák
>
> Martin Koci píše v Út 14. 09. 2010 v 23:05 +0200:
> > Hi,
> >
> >
> > please review https://issues.apache.org/jira/browse/MYFACES-2922 and
> > apply if possible.
> >
> > Thanks,
> >
> > Kočičák
> >
> >
> > Leonardo Uribe píše v Pá 06. 08. 2010 v 13:07 -0500:
> > > Hi
> > >
> > > 2010/8/6 Martin Koci <ma...@aura.cz>
> > > Hi,
> > >
> > >
> > > is it possible to cache inspected classes in
> > > RequestViewContext? I did
> > > something like that:
> > >
> > > if (isProduction && !
> > > requestViewContext.isAlreadyInspected(inspectedClass)) {
> > >
> > > _handleListenerForAnnotations(context, inspected,
> > > inspectedClass, component, isProduction);
> > >
> > > _handleResourceDependencyAnnotations(context,
> > > inspectedClass, component, isProduction);
> > >
> > > requestViewContext.setAsProcessed(inspectedClass);
> > > }
> > >
> > > in _handleAnnotations and it reduces restore view time to
> > > 30-40 ms.
> > >
> > >
> > > It is necessary to apply @ListenerFor annotations on every component
> > > that has registered
> > > it in the view. The reason why we can cache @ResourceDependency is
> > > this annotation
> > > cause a component resource to be added, and that one will be always
> > > the "same".
> > >
> > > regards,
> > >
> > > Leonardo
> > >
> > >
> > > regards,
> > >
> > > Martin Kočí
> > >
> > > Leonardo Uribe píše v Čt 05. 08. 2010 v 15:56 -0500:
> > >
> > > > Hi
> > > >
> > > > Ok, good to know that. I closed MYFACES-2854. Maybe on
> > > MYFACES-2862 we
> > > > can use FacesContext.isProjectStage(ProjectStage).
> > > >
> > > > regards,
> > > >
> > > > Leonardo
> > > >
> > > > 2010/8/5 Martin Koci <ma...@aura.cz>
> > > > Hi,
> > > >
> > > > success!
> > > >
> > > > myfaces + MYFACES-2854-2.patch + MYFACES-2862 = ~ 70
> > > ms in
> > > > restore view
> > > > phase. It was *750 ms* before.
> > > >
> > > > Thanks,
> > > >
> > > > Martin Kočí
> > > >
> > > > Leonardo Uribe píše v St 04. 08. 2010 v 22:09 -0500:
> > > >
> > > > > Hi
> > > > >
> > > > > I implemented a proposal for this one on
> > > > MYFACES-2854-2.patch using
> > > > > the suggestion
> > > > > proposed (do not apply ResourceDependency if it
> > > was already
> > > > > processed). I hope that
> > > > > patch solve the problem.
> > > > >
> > > > > regards,
> > > > >
> > > > > Leonardo
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>
Re: Myfaces vs. mojarra restore view performance
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
Both optimizations are ok. +1
If you want I can commit it but I suggest you commit them.
regards,
Leonardo
2010/9/30 Matthias Wessendorf <ma...@apache.org>
> MArtin,
>
> your account is now setup - you even could apply them yourself,
> after Leo did a successful review
>
> -;M
>
> On Thu, Sep 30, 2010 at 1:14 PM, Martin Koci
> <ma...@gmail.com> wrote:
> > Hi,
> >
> > Leonardo, can you please review :
> > https://issues.apache.org/jira/browse/MYFACES-2922
> > https://issues.apache.org/jira/browse/MYFACES-2862
> >
> > and apply them if they are suitable?
> >
> >
> > Thanks,
> >
> > Kočičák
> >
> > Martin Koci píše v Út 14. 09. 2010 v 23:05 +0200:
> >> Hi,
> >>
> >>
> >> please review https://issues.apache.org/jira/browse/MYFACES-2922 and
> >> apply if possible.
> >>
> >> Thanks,
> >>
> >> Kočičák
> >>
> >>
> >> Leonardo Uribe píše v Pá 06. 08. 2010 v 13:07 -0500:
> >> > Hi
> >> >
> >> > 2010/8/6 Martin Koci <ma...@aura.cz>
> >> > Hi,
> >> >
> >> >
> >> > is it possible to cache inspected classes in
> >> > RequestViewContext? I did
> >> > something like that:
> >> >
> >> > if (isProduction && !
> >> > requestViewContext.isAlreadyInspected(inspectedClass)) {
> >> >
> >> > _handleListenerForAnnotations(context, inspected,
> >> > inspectedClass, component, isProduction);
> >> >
> >> > _handleResourceDependencyAnnotations(context,
> >> > inspectedClass, component, isProduction);
> >> >
> >> > requestViewContext.setAsProcessed(inspectedClass);
> >> > }
> >> >
> >> > in _handleAnnotations and it reduces restore view time to
> >> > 30-40 ms.
> >> >
> >> >
> >> > It is necessary to apply @ListenerFor annotations on every component
> >> > that has registered
> >> > it in the view. The reason why we can cache @ResourceDependency is
> >> > this annotation
> >> > cause a component resource to be added, and that one will be always
> >> > the "same".
> >> >
> >> > regards,
> >> >
> >> > Leonardo
> >> >
> >> >
> >> > regards,
> >> >
> >> > Martin Kočí
> >> >
> >> > Leonardo Uribe píše v Čt 05. 08. 2010 v 15:56 -0500:
> >> >
> >> > > Hi
> >> > >
> >> > > Ok, good to know that. I closed MYFACES-2854. Maybe on
> >> > MYFACES-2862 we
> >> > > can use FacesContext.isProjectStage(ProjectStage).
> >> > >
> >> > > regards,
> >> > >
> >> > > Leonardo
> >> > >
> >> > > 2010/8/5 Martin Koci <ma...@aura.cz>
> >> > > Hi,
> >> > >
> >> > > success!
> >> > >
> >> > > myfaces + MYFACES-2854-2.patch + MYFACES-2862 = ~ 70
> >> > ms in
> >> > > restore view
> >> > > phase. It was *750 ms* before.
> >> > >
> >> > > Thanks,
> >> > >
> >> > > Martin Kočí
> >> > >
> >> > > Leonardo Uribe píše v St 04. 08. 2010 v 22:09 -0500:
> >> > >
> >> > > > Hi
> >> > > >
> >> > > > I implemented a proposal for this one on
> >> > > MYFACES-2854-2.patch using
> >> > > > the suggestion
> >> > > > proposed (do not apply ResourceDependency if it
> >> > was already
> >> > > > processed). I hope that
> >> > > > patch solve the problem.
> >> > > >
> >> > > > regards,
> >> > > >
> >> > > > Leonardo
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
Re: Myfaces vs. mojarra restore view performance
Posted by Matthias Wessendorf <ma...@apache.org>.
MArtin,
your account is now setup - you even could apply them yourself,
after Leo did a successful review
-;M
On Thu, Sep 30, 2010 at 1:14 PM, Martin Koci
<ma...@gmail.com> wrote:
> Hi,
>
> Leonardo, can you please review :
> https://issues.apache.org/jira/browse/MYFACES-2922
> https://issues.apache.org/jira/browse/MYFACES-2862
>
> and apply them if they are suitable?
>
>
> Thanks,
>
> Kočičák
>
> Martin Koci píše v Út 14. 09. 2010 v 23:05 +0200:
>> Hi,
>>
>>
>> please review https://issues.apache.org/jira/browse/MYFACES-2922 and
>> apply if possible.
>>
>> Thanks,
>>
>> Kočičák
>>
>>
>> Leonardo Uribe píše v Pá 06. 08. 2010 v 13:07 -0500:
>> > Hi
>> >
>> > 2010/8/6 Martin Koci <ma...@aura.cz>
>> > Hi,
>> >
>> >
>> > is it possible to cache inspected classes in
>> > RequestViewContext? I did
>> > something like that:
>> >
>> > if (isProduction && !
>> > requestViewContext.isAlreadyInspected(inspectedClass)) {
>> >
>> > _handleListenerForAnnotations(context, inspected,
>> > inspectedClass, component, isProduction);
>> >
>> > _handleResourceDependencyAnnotations(context,
>> > inspectedClass, component, isProduction);
>> >
>> > requestViewContext.setAsProcessed(inspectedClass);
>> > }
>> >
>> > in _handleAnnotations and it reduces restore view time to
>> > 30-40 ms.
>> >
>> >
>> > It is necessary to apply @ListenerFor annotations on every component
>> > that has registered
>> > it in the view. The reason why we can cache @ResourceDependency is
>> > this annotation
>> > cause a component resource to be added, and that one will be always
>> > the "same".
>> >
>> > regards,
>> >
>> > Leonardo
>> >
>> >
>> > regards,
>> >
>> > Martin Kočí
>> >
>> > Leonardo Uribe píše v Čt 05. 08. 2010 v 15:56 -0500:
>> >
>> > > Hi
>> > >
>> > > Ok, good to know that. I closed MYFACES-2854. Maybe on
>> > MYFACES-2862 we
>> > > can use FacesContext.isProjectStage(ProjectStage).
>> > >
>> > > regards,
>> > >
>> > > Leonardo
>> > >
>> > > 2010/8/5 Martin Koci <ma...@aura.cz>
>> > > Hi,
>> > >
>> > > success!
>> > >
>> > > myfaces + MYFACES-2854-2.patch + MYFACES-2862 = ~ 70
>> > ms in
>> > > restore view
>> > > phase. It was *750 ms* before.
>> > >
>> > > Thanks,
>> > >
>> > > Martin Kočí
>> > >
>> > > Leonardo Uribe píše v St 04. 08. 2010 v 22:09 -0500:
>> > >
>> > > > Hi
>> > > >
>> > > > I implemented a proposal for this one on
>> > > MYFACES-2854-2.patch using
>> > > > the suggestion
>> > > > proposed (do not apply ResourceDependency if it
>> > was already
>> > > > processed). I hope that
>> > > > patch solve the problem.
>> > > >
>> > > > regards,
>> > > >
>> > > > Leonardo
>> > > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>> >
>>
>>
>
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Re: Myfaces vs. mojarra restore view performance
Posted by Martin Koci <ma...@gmail.com>.
Hi,
Leonardo, can you please review :
https://issues.apache.org/jira/browse/MYFACES-2922
https://issues.apache.org/jira/browse/MYFACES-2862
and apply them if they are suitable?
Thanks,
Kočičák
Martin Koci píše v Út 14. 09. 2010 v 23:05 +0200:
> Hi,
>
>
> please review https://issues.apache.org/jira/browse/MYFACES-2922 and
> apply if possible.
>
> Thanks,
>
> Kočičák
>
>
> Leonardo Uribe píše v Pá 06. 08. 2010 v 13:07 -0500:
> > Hi
> >
> > 2010/8/6 Martin Koci <ma...@aura.cz>
> > Hi,
> >
> >
> > is it possible to cache inspected classes in
> > RequestViewContext? I did
> > something like that:
> >
> > if (isProduction && !
> > requestViewContext.isAlreadyInspected(inspectedClass)) {
> >
> > _handleListenerForAnnotations(context, inspected,
> > inspectedClass, component, isProduction);
> >
> > _handleResourceDependencyAnnotations(context,
> > inspectedClass, component, isProduction);
> >
> > requestViewContext.setAsProcessed(inspectedClass);
> > }
> >
> > in _handleAnnotations and it reduces restore view time to
> > 30-40 ms.
> >
> >
> > It is necessary to apply @ListenerFor annotations on every component
> > that has registered
> > it in the view. The reason why we can cache @ResourceDependency is
> > this annotation
> > cause a component resource to be added, and that one will be always
> > the "same".
> >
> > regards,
> >
> > Leonardo
> >
> >
> > regards,
> >
> > Martin Kočí
> >
> > Leonardo Uribe píše v Čt 05. 08. 2010 v 15:56 -0500:
> >
> > > Hi
> > >
> > > Ok, good to know that. I closed MYFACES-2854. Maybe on
> > MYFACES-2862 we
> > > can use FacesContext.isProjectStage(ProjectStage).
> > >
> > > regards,
> > >
> > > Leonardo
> > >
> > > 2010/8/5 Martin Koci <ma...@aura.cz>
> > > Hi,
> > >
> > > success!
> > >
> > > myfaces + MYFACES-2854-2.patch + MYFACES-2862 = ~ 70
> > ms in
> > > restore view
> > > phase. It was *750 ms* before.
> > >
> > > Thanks,
> > >
> > > Martin Kočí
> > >
> > > Leonardo Uribe píše v St 04. 08. 2010 v 22:09 -0500:
> > >
> > > > Hi
> > > >
> > > > I implemented a proposal for this one on
> > > MYFACES-2854-2.patch using
> > > > the suggestion
> > > > proposed (do not apply ResourceDependency if it
> > was already
> > > > processed). I hope that
> > > > patch solve the problem.
> > > >
> > > > regards,
> > > >
> > > > Leonardo
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>