You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Mark Struberg <st...@yahoo.de> on 2013/04/13 14:10:01 UTC

getBeans() performance

Hi!

Leo and Gerhard recently found a performance impact by getBeans() doing all the validations for the given qualifiers over and over again. 

Imo we can spare this for almost all of our internal getBeans() invocations.



Wdyt: should we move this check from our BeanManagerImpl to the InjectableBeanManager?

Thus if a user (or Extension) gets a BeanManager injected, he will always get the injectable version which will perform the checks. But we would get rid of the punishment for all our internal calls, e.g. in our proxies, etc.

LieGrue,
strub

Re: getBeans() performance

Posted by Gerhard Petracek <ge...@gmail.com>.
hi mark,

you found something new, that isn't the bottleneck we saw.

regards,
gerhard



2013/4/13 Romain Manni-Bucau <rm...@gmail.com>

> It can be done at startup for sure, either use the same scanning than in
> tomee or more cleverly use default scanning allowing it to be extended for
> needed cases (noone in real life).
> Le 13 avr. 2013 18:47, "Mark Struberg" <st...@yahoo.de> a écrit :
>
> > Romain, I think it cannot only be done at startup. What about all the
> > manually executed getBeans() + resolve() + getReference() ?
> >
> > But all those just use the injected BeanManager where we can check it.
> >
> >
> > LieGrue,
> > strub
> >
> >
> > ----- Original Message -----
> > > From: Romain Manni-Bucau <rm...@gmail.com>
> > > To: Mark Struberg <st...@yahoo.de>; dev@openwebbeans.apache.org
> > > Cc:
> > > Sent: Saturday, 13 April 2013, 14:50
> > > Subject: Re: getBeans() performance
> > >
> > > It should just be done at startup (it clearly can) then be thrown at
> > > runtime if mandatory
> > > Le 13 avr. 2013 14:11, "Mark Struberg" <st...@yahoo.de> a
> > > écrit :
> > >
> > >>  Hi!
> > >>
> > >>  Leo and Gerhard recently found a performance impact by getBeans()
> doing
> > >>  all the validations for the given qualifiers over and over again.
> > >>
> > >>  Imo we can spare this for almost all of our internal getBeans()
> > >>  invocations.
> > >>
> > >>
> > >>
> > >>  Wdyt: should we move this check from our BeanManagerImpl to the
> > >>  InjectableBeanManager?
> > >>
> > >>  Thus if a user (or Extension) gets a BeanManager injected, he will
> > always
> > >>  get the injectable version which will perform the checks. But we
> would
> > get
> > >>  rid of the punishment for all our internal calls, e.g. in our
> proxies,
> > etc.
> > >>
> > >>  LieGrue,
> > >>  strub
> > >
>

Re: getBeans() performance

Posted by Romain Manni-Bucau <rm...@gmail.com>.
It can be done at startup for sure, either use the same scanning than in
tomee or more cleverly use default scanning allowing it to be extended for
needed cases (noone in real life).
Le 13 avr. 2013 18:47, "Mark Struberg" <st...@yahoo.de> a écrit :

> Romain, I think it cannot only be done at startup. What about all the
> manually executed getBeans() + resolve() + getReference() ?
>
> But all those just use the injected BeanManager where we can check it.
>
>
> LieGrue,
> strub
>
>
> ----- Original Message -----
> > From: Romain Manni-Bucau <rm...@gmail.com>
> > To: Mark Struberg <st...@yahoo.de>; dev@openwebbeans.apache.org
> > Cc:
> > Sent: Saturday, 13 April 2013, 14:50
> > Subject: Re: getBeans() performance
> >
> > It should just be done at startup (it clearly can) then be thrown at
> > runtime if mandatory
> > Le 13 avr. 2013 14:11, "Mark Struberg" <st...@yahoo.de> a
> > écrit :
> >
> >>  Hi!
> >>
> >>  Leo and Gerhard recently found a performance impact by getBeans() doing
> >>  all the validations for the given qualifiers over and over again.
> >>
> >>  Imo we can spare this for almost all of our internal getBeans()
> >>  invocations.
> >>
> >>
> >>
> >>  Wdyt: should we move this check from our BeanManagerImpl to the
> >>  InjectableBeanManager?
> >>
> >>  Thus if a user (or Extension) gets a BeanManager injected, he will
> always
> >>  get the injectable version which will perform the checks. But we would
> get
> >>  rid of the punishment for all our internal calls, e.g. in our proxies,
> etc.
> >>
> >>  LieGrue,
> >>  strub
> >

Re: getBeans() performance

Posted by Mark Struberg <st...@yahoo.de>.
Romain, I think it cannot only be done at startup. What about all the manually executed getBeans() + resolve() + getReference() ?

But all those just use the injected BeanManager where we can check it.


LieGrue,
strub


----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: Mark Struberg <st...@yahoo.de>; dev@openwebbeans.apache.org
> Cc: 
> Sent: Saturday, 13 April 2013, 14:50
> Subject: Re: getBeans() performance
> 
> It should just be done at startup (it clearly can) then be thrown at
> runtime if mandatory
> Le 13 avr. 2013 14:11, "Mark Struberg" <st...@yahoo.de> a 
> écrit :
> 
>>  Hi!
>> 
>>  Leo and Gerhard recently found a performance impact by getBeans() doing
>>  all the validations for the given qualifiers over and over again.
>> 
>>  Imo we can spare this for almost all of our internal getBeans()
>>  invocations.
>> 
>> 
>> 
>>  Wdyt: should we move this check from our BeanManagerImpl to the
>>  InjectableBeanManager?
>> 
>>  Thus if a user (or Extension) gets a BeanManager injected, he will always
>>  get the injectable version which will perform the checks. But we would get
>>  rid of the punishment for all our internal calls, e.g. in our proxies, etc.
>> 
>>  LieGrue,
>>  strub
> 

Re: getBeans() performance

Posted by Gerhard Petracek <ge...@gmail.com>.
@mark: see [1].

regards,
gerhard

[1] https://issues.apache.org/jira/browse/OWB-798



2013/4/13 Romain Manni-Bucau <rm...@gmail.com>

> It should just be done at startup (it clearly can) then be thrown at
> runtime if mandatory
> Le 13 avr. 2013 14:11, "Mark Struberg" <st...@yahoo.de> a écrit :
>
> > Hi!
> >
> > Leo and Gerhard recently found a performance impact by getBeans() doing
> > all the validations for the given qualifiers over and over again.
> >
> > Imo we can spare this for almost all of our internal getBeans()
> > invocations.
> >
> >
> >
> > Wdyt: should we move this check from our BeanManagerImpl to the
> > InjectableBeanManager?
> >
> > Thus if a user (or Extension) gets a BeanManager injected, he will always
> > get the injectable version which will perform the checks. But we would
> get
> > rid of the punishment for all our internal calls, e.g. in our proxies,
> etc.
> >
> > LieGrue,
> > strub
>

Re: getBeans() performance

Posted by Romain Manni-Bucau <rm...@gmail.com>.
It should just be done at startup (it clearly can) then be thrown at
runtime if mandatory
Le 13 avr. 2013 14:11, "Mark Struberg" <st...@yahoo.de> a écrit :

> Hi!
>
> Leo and Gerhard recently found a performance impact by getBeans() doing
> all the validations for the given qualifiers over and over again.
>
> Imo we can spare this for almost all of our internal getBeans()
> invocations.
>
>
>
> Wdyt: should we move this check from our BeanManagerImpl to the
> InjectableBeanManager?
>
> Thus if a user (or Extension) gets a BeanManager injected, he will always
> get the injectable version which will perform the checks. But we would get
> rid of the punishment for all our internal calls, e.g. in our proxies, etc.
>
> LieGrue,
> strub