[
https://issues.apache.org/jira/browse/CAMEL-26940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-26940:
-----------------------------------
Assignee: Claus Ibsen
> camel-jbang - use a JDK 25 AOT cache instead of a CDS archive per command
> -------------------------------------------------------------------------
>
> Key: CAMEL-26940
> URL: https://issues.apache.org/jira/browse/CAMEL-26940
> Project: Camel
> Issue Type: Sub-task
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> Measured on 2026-11-13 with the unpacked 4.24.0-SNAPSHOT camel-launcher on
> macOS (Apple M4 Pro, JDK 25), warm CDS archives, medians of 5-9 runs on a
> machine with other load (treat as +/-30 %). Estimates are marked as such.
> Paths are relative to {{dsl/camel-jbang/}}.
> {{camel.sh}} makes one dynamic CDS archive per first word
> ({{-XX:+AutoCreateSharedArchive}}, see also CAMEL-26913 item 7). On JDK 25
> the AOT cache (JEP 483, 514, 515; flags {{AOTCache}}, {{AOTCacheOutput}},
> {{AOTMode}} checked on the JDK) is faster:
> ||Variant||get route||doc||validate||cmd send||
> |today (dynamic CDS)|0.287|0.256|0.420|0.459|
> |AOT cache per command|0.220|0.216|0.317|0.384|
> |AOT cache + C1 + SerialGC|0.202|0.199|0.284|0.362|
> One shared cache (trained only on cmd send) gives get route 0.248, doc 0.235,
> ps 0.220, log 0.222, but validate 0.453 (slower): the training run must cover
> the commands broadly (catalog, validate, get, cmd, log). A cache is 35-50 MB
> and takes 1-2 s to train.
> Proposal: on Java 25+, one shared AOT cache trained by a broad workload at
> install time or on first use, remade when the JDK or the jars change; keep
> dynamic CDS on Java 21-24. This also removes the poor archives made by a
> first call without a running integration (1,400-1,760 classes missing, never
> refreshed), and the fresh-sandbox penalty (first loop 12.3 s and 177 MB of
> archives). Same change in camel.bat.
> _Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)