[ https://issues.apache.org/jira/browse/OWB-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308677#comment-17308677 ]
Romain Manni-Bucau commented on OWB-1381: ----------------------------------------- [~tandraschko] JSF has CDI lifecycle by construction so it is quite trivial to cache the instances - for normal scoped/dependent beans - and/or factories (bean and then use create/destroy method) in a jsf cdi extension which is well scoped and with release callbacks as needed. The issue in OWB is to not cache at a high memory cost, here for 100 beans you can get - literally - 10000 lookups (in EE) and I don't see us caching 100000 misses which wouldn't even improve the performances if the callers fix their usage. It is a bit like CDI.current() usage which is slow by construction if done at runtime, no point caching the underlying value in the cdi spec, the caller must cache the value in consistency with its lifecycle/context. > Empty resolvedComponents not cached in InjectionResolver > -------------------------------------------------------- > > Key: OWB-1381 > URL: https://issues.apache.org/jira/browse/OWB-1381 > Project: OpenWebBeans > Issue Type: Improvement > Components: Injection and Lookup > Affects Versions: 2.0.21 > Reporter: Vladimir Dvorak > Priority: Minor > > YourKit performance analyzer showed that the call of > InjectionResolver.implResolveByType() could be pretty expensive. The method > uses caching except the case when no component is found. This case is skipped > at the end of the metod as is visible at: > [https://github.com/apache/openwebbeans/blob/master/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java#L559] > > In our case we have huge JSF page with a lot of JSF Converters classes, that > form injectionPointType input argument of the method. It is not clear why JSF > converters are not found... > -- This message was sent by Atlassian Jira (v8.3.4#803005)