It turns out that our bunch static method classes have some downsides.

All things which need 'application specific' configuration or behaviour can 
only 
be saved cleanly by maintaining a Map<ClassLoader, Object config>. But getting 
the ClassLoader might be pretty expensive. In general: the WebBeansFinder is 
currently needed way too often. If we would not use static methods (almost 
exclusively) but use e.g. our BeanManagerImpl as a 'singleton server' then we 
could easily add those kind of configuration.

Just startup a profiler and look at how often BeanManagerImpl.getManger() gets 
called (this goes up to > 100000 for a complex JSF page). This is imo way too 
often and mainly caused because we don't pass the BeanManager around but always 
use the (compared to a simple method invocation) expensive singleton accessor 
instead.


It's not really pressing, but I think we could easily add another 20% 
performance boost by changing this.

LieGrue,
strub


----- Original Message ----
> From: David Blevins <david.blev...@visi.com>
> To: dev@openwebbeans.apache.org
> Sent: Thu, August 5, 2010 9:31:50 PM
> Subject: Re: Interceptor callback signature strictness
> 
> 
> On Aug 5, 2010, at 11:18 AM, David Blevins wrote:
> 
> > This is a  debatable chance, but the goal is to somehow make it possible 
> > for 
>integrators to  be less strict with this particular spec rule.
> > 
> >    http://svn.apache.org/viewvc?view=revision&revision=982715
> > 
> >  Basically, we opted not to strictly enforce this as the  
>invocationContext.proceed() method throws Exception so it forces all  
>interceptors to needlessly catch and convert that checked exception to a 
>runtime  
>exception to meet the spec requirements:
> > 
> >         @PostConstruct
> >        public void  construct(InvocationContext context) {
> >             try {
> >                 context.proceed();
> >            } catch  (Exception e) {
> >                 throw new RuntimeException(e);
> >             }
> >        }
> > 
> > The result is that if a  callback exception is thrown by the bean, it will 
>end up being wrapped and  re-thrown N number of times.
> > 
> > Not terrible, but it is a bit of  bad API.
> > 
> > Anyway, if anyone sees a better way to do this I'm  open to solutions.  I 
>just went with simple and direct so it would be  easily revertible and 
>changeable if we wanted to do something  different.
> 
> 
> On Aug 5, 2010, at 11:03 AM, Mark Struberg  wrote:
> 
> > hi david, how do you set this property ?
> > I really  hate public flags ;)
> > 
> > Isn't ther an option to use our classic  OpenWebBeansConfiguration?
> > 
> 
> Hehe, missed your note -- was writing  the above.
> 
> Not a fan of static flags either.  As I mention above was  going for easy to 
>remove since I wasn't sure how it really should be  done.
> 
> You want to make the proposed change?  (not sure I see exactly  how you 
> imagine 
>it, will be good to watch as an  example)
> 
> 
> -David
> 
> 


      

Reply via email to