Sander van den Berg created ARIES-2243:
------------------------------------------

             Summary: 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
         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


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