[ 
https://issues.apache.org/jira/browse/OWB-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308674#comment-17308674
 ] 

Romain Manni-Bucau commented on OWB-1382:
-----------------------------------------

Hi [~skybber],

 

As shown in https://issues.apache.org/jira/browse/OWB-1095 the issue is "when 
can we cache", during the startup it is not always possible to cache everything 
so it must be refined to enable to cache only when the bean set does not change 
anymore (startup boolean) cause in all other cases it will lead to a wrong 
cached data (what we had before the mentionned ticket).

 

Side note: issue is not the project simplicity but the number of beans so we 
should think in terms of complexity (o(n) likely, n being the number of beans. 
A real life project with controlled scanning is around 100 beans so should 
start in around 500ms on a i7).

> Class javax.enterprise.inject.spi.BeanManager not cached on start
> -----------------------------------------------------------------
>
>                 Key: OWB-1382
>                 URL: https://issues.apache.org/jira/browse/OWB-1382
>             Project: OpenWebBeans
>          Issue Type: Improvement
>          Components: Context and Scopes
>            Reporter: Vladimir Dvorak
>            Priority: Minor
>
> Class javax.enterprise.inject.spi.BeanManager generates a lot of full lookups 
> (tens of thousands) in InjectionResolver.implResolveByType() when OWB is 
> starting even in simple project. It looks that OWB starts could be improved 
> by 10-20% by introducing caching. I'm trying  to put cache in BeanImpl as is 
> shown there:
>  
> [https://github.com/skybber/pf-expensive-converter/blob/main/addhoc/org/apache/webbeans/container/InjectionResolver.java#L491]
>  
> it skips expensive iteration over all beans and improves start of OWB, in my 
> case from 10.5s to 9.9s. Probably there is better way how to do it, since the 
> problem is only with the class javax.enterprise.inject.spi.BeanManager.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to