-
Hi @mkouba & @manovotn (and possibly @Ladicek)! Is Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @famod, what beans are you resolving? For normal scoped beans this isn't anyhow costly - it's a matter of few object allocations, resolution process (based on type and qualifier) and returning you a proxy. Although I should note that there is little reason to use If it is |
Beta Was this translation helpful? Give feedback.
Hi @famod,
what beans are you resolving?
For normal scoped beans this isn't anyhow costly - it's a matter of few object allocations, resolution process (based on type and qualifier) and returning you a proxy. Although I should note that there is little reason to use
Instance
if you could just@Inject
and store the beans you need in fields. While the resolution process isn't costly, it is still doing something which cannot compete with things like plain field access. Especially if you're going to do that repeatedly.If it is
@Dependent
beans you are talking about, then this will make a huge difference asInstance
will by default always create new contextual reference (i.e. new actual bean)…