Hey folks

I've run into an interesting problem on the TomEE-side, running an EAR
file. This seems to end up with 2 injection resolvers for the application:
one for the web part of the application, and a parent for the EAR.

When resolving by type at runtime, with large archives, we've seen a
slowdown from previous versions of OpenWebBeans. This appears to be caused
by the InjectionResolver.implResolveByType returning an empty set. TomEE
will then try the parent resolver (successfully), but the result (empty
set) in the child resolver is not cached, so it searches through the whole
set of beans each time. The result used to be cached, prior to this commit:
https://github.com/apache/openwebbeans/commit/a6d22d2abf6d6d5a02a14be1367daacca450359d

Could caching the empty result in the InjectionResolver be re-introduced,
albeit with a switch? (I'm happy for the default to be "don't cache").
Interestingly, InjectionResolver.implResolveByName does cache the empty
result. I'm happy to create a PR.

Many thanks

Jon

Reply via email to