gnodet commented on PR #13319: URL: https://github.com/apache/maven/pull/13319#issuecomment-6187568647
The SISU machinery behind `lookup.lookupList(TypeProvider.class)` is cheaper than it looks: - `DefaultBeanLocator` has a `ConcurrentMap<Long, RankedBindings>` keyed by type-id — so fetching the `RankedBindings` for `TypeProvider.class` is a single lock-free map lookup after the first call. - Iterating `RankedBindings` walks a `RankedSequence` (a sorted array, no global lock). - The visibility predicate (project-scoped filtering) is evaluated per-entry, but for the common case where no project extension contributes a `TypeProvider`, the sequence is empty and `findFirst()` returns immediately. Per-request memoization is intentionally not added: caching the dynamic-provider result would defeat the per-project-classloader isolation that motivates the whole change. The Javadoc on `require()` now documents this tradeoff explicitly so future readers don't have to rediscover it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
