You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Thomas Andraschko (Jira)" <ji...@apache.org> on 2026/04/14 13:37:00 UTC

[jira] [Updated] (OWB-1457) [perf] Reuse generics “visited” map in InjectionResolver#implResolveByType

     [ https://issues.apache.org/jira/browse/OWB-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Andraschko updated OWB-1457:
-----------------------------------
    Description: 
During implResolveByType, GenericsUtil.satisfiesDependency was called with a new HashMap for every bean API type (and again inside findByParameterizedType / findByBeanType). That caused many short-lived maps on each cache miss or startup validation.

Allocate one HashMap<Type, Integer> per implResolveByType invocation, clear() before each satisfiesDependency call, and pass it through findByParameterizedType and findByBeanType. Semantics are unchanged

> [perf] Reuse generics “visited” map in InjectionResolver#implResolveByType
> --------------------------------------------------------------------------
>
>                 Key: OWB-1457
>                 URL: https://issues.apache.org/jira/browse/OWB-1457
>             Project: OpenWebBeans
>          Issue Type: Task
>            Reporter: Thomas Andraschko
>            Priority: Major
>             Fix For: 4.1.0
>
>
> During implResolveByType, GenericsUtil.satisfiesDependency was called with a new HashMap for every bean API type (and again inside findByParameterizedType / findByBeanType). That caused many short-lived maps on each cache miss or startup validation.
> Allocate one HashMap<Type, Integer> per implResolveByType invocation, clear() before each satisfiesDependency call, and pass it through findByParameterizedType and findByBeanType. Semantics are unchanged



--
This message was sent by Atlassian Jira
(v8.20.10#820010)