[ 
https://issues.apache.org/jira/browse/ARIES-2243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18138677#comment-18138677
 ] 

Sander van den Berg commented on ARIES-2243:
--------------------------------------------

Thanks, Dominik. I’ve opened [PR #944|https://github.com/apache/aries/pull/944].

I’ve kept the scope limited to SPI Fly, where we identified and measured the 
localization overhead and validated the change. Similar changes in other Aries 
modules could be handled separately.

> Avoid manifest localization during consumer discovery
> -----------------------------------------------------
>
>                 Key: ARIES-2243
>                 URL: https://issues.apache.org/jira/browse/ARIES-2243
>             Project: Aries
>          Issue Type: Bug
>          Components: SPI Fly
>    Affects Versions: spifly-1.3.7, spifly-1.3.8
>         Environment: Eclipse/Equinox-based RCP application
> Windows x86_64
> Eclipse 2026-06 (4.40)
> Eclipse Temurin JDK 25.0.3
> Apache Aries SPI Fly Dynamic Weaving Bundle 1.3.7
> 612 installed bundles
>            Reporter: Sander van den Berg
>            Priority: Major
>
> While profiling startup of an Eclipse/Equinox application using SPI Fly 
> 1.3.7, I found that consumer discovery spends significant time retrieving 
> localized manifest headers.
> In {{{}BaseActivator.getAllHeaders{}}}, headers are retrieved using:
> {code:java}
> String header = bf.getHeaders().get(headerName);
> {code}
> In Equinox, this requests localized headers and can trigger loading of 
> localization resources, even though the caller only needs technical 
> declarations such as {{SPI-Consumer}} and {{{}Require-Capability{}}}.
> Using raw headers instead:
> {code:java}
> String header = bf.getHeaders("").get(headerName);
> {code}
> reduced header-collection time in two alternating comparisons:
> ||Header access||Comparison 1||Comparison 2||
> |Localized headers|577 ms|776 ms|
> |Raw headers|222 ms|332 ms|
> The application contains 612 bundles. Header parsing itself took 
> approximately 11–19 ms. These are instrumented method timings; a repeatable 
> improvement in overall application startup time has not been established.
> None of the relevant header values in the tested bundle set use localization. 
> Startup and a basic editor smoke test passed with the substitution.
> The measurements were taken on 1.3.7. I also checked the released 1.3.8 
> sources, which still contain the same call.
> Is localization of these declarations intentionally supported, or would raw 
> header access be appropriate here? I would be happy to contribute a patch and 
> regression test.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to