[
https://issues.apache.org/jira/browse/CAMEL-26392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-26392 started by Adriano Machado.
-----------------------------------------------
> camel-core - Type converter: cache lookup results, also when no converter is
> found
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-26392
> URL: https://issues.apache.org/jira/browse/CAMEL-26392
> Project: Camel
> Issue Type: Sub-task
> Components: camel-core
> Reporter: Adriano Machado
> Assignee: Adriano Machado
> Priority: Major
>
> Tier 1 item #6 of CAMEL\-25132. EnumTypeConverter asks the registry for a
> dedicated converter on every String to enum conversion, and
> TypeConverterRegistry.lookup runs TypeResolverHelper.doLookup without caching
> positive or negative results: it walks the type hierarchy twice and scans all
> converters. convertTo\(LoggingLevel, "INFO"\) costs about 895 ns and 1,480 B,
> and more with more converters on the classpath. Cache lookup results
> \(including misses\) and clear the cache when converters change, cache the
> enum constants per enum type with a ClassValue, and do not throw on the
> tryConvertTo path when no enum constant matches.
> _Claude Code on behalf of Adriano Machado \(@ammachado\)_
> _This was generated by an AI agent and may contain inaccuracies. Please
> verify before relying on it._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)