Startup ~2x slower with AOT class linking: agent retransforms ~22k preloaded classes (JDK 25, 1.67.0)
维护者通常 2 天内回复
@mcculls 已经在做这个了。
开始于 2026年10月8日。
评估
这个 Issue 还没有评估数据。
描述
Tracer Version(s)
1.67.0
Java Version(s)
Temurin 25.0.2
JVM Vendor
Eclipse Adoptium / Temurin
Bug Report
Since AOT support has been improved here:
- https://github.com/DataDog/dd-trace-java/issues/10479
- https://github.com/DataDog/dd-trace-java/issues/12540
We have been trying out fully utilizing AOT. We are able to see gains on application start time at around 60% speed improvements. We notice before the app starts though, it's slowed down significantly, leaving us with only a total 20% speed improvement overall for startup.
Some examples from our actual applications:
Before (6 Oct):
2026-10-06T22:24:00Z Started FooApplicationKt in 13.317 seconds (process running for 15.688) gap 2.4s
2026-10-06T22:22:47Z Started FooApplicationKt in 14.593 seconds (process running for 17.011) gap 2.4s
2026-10-06T22:21:54Z Started FooApplicationKt in 14.482 seconds (process running for 17.007) gap 2.5s
After (8 Oct):
2026-10-08T16:45:05Z Started FooApplicationKt in 6.136 seconds (process running for 12.36) gap 6.2s
2026-10-08T16:45:04Z Started FooApplicationKt in 7.517 seconds (process running for 14.191) gap 6.7s
2026-10-08T16:38:03Z Started FooApplicationKt in 5.985 seconds (process running for 12.091) gap 6.1s
Expected Behavior
AOT application startup speed improvements should not be negated at pre-application startup stage.
Reproduction Code
Here's a repro:
https://gist.github.com/davidgoldtempo/fdc330f67eeba5848689e8a7fd4d815c
JDK: openjdk version "25.0.2" 2026-01-20 LTS
Agent: dd-java-agent 1.67.0
Runs: 5 per variant
Work: /tmp/aot-startup-repro-work (rm -rf to clean up)
Main: org.springframework.samples.petclinic.PetClinicApplication
Training AOT caches...
=== median of 5 starts, dd-java-agent 1.67.0 ===
(pre-spring gap = JVM uptime at 'Started' minus Spring's own startup time)
no AOT, no agent spring= 3.20s process= 3.41s pre-spring gap= 0.21s redefined-classes=0
no AOT, agent spring= 3.87s process= 4.91s pre-spring gap= 1.04s redefined-classes=8
AOT no-classlink, agent spring= 3.80s process= 4.88s pre-spring gap= 1.08s redefined-classes=8
AOT classlink, no agent spring= 1.14s process= 1.36s pre-spring gap= 0.23s redefined-classes=0
AOT classlink, agent <== SLOW GAP spring= 1.20s process= 3.32s pre-spring gap= 2.12s redefined-classes=87
- 主要语言
- Java
- 星标
- 736
- 派生
- 364
- 平均合并
- 3 天 13 小时
- 30 天内合并 PR
- 213
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataDog/dd-trace-java 的其他 Issue
-
type: bug report
难度 2/5 1-3 小时 新手友好度 72/100
DataDog/dd-trace-java#12818 ·
维护者通常 2 天内回复
-
Update DEFAULT_HTTP_CLIENT_ERROR_STATUSES to include 5xx status codes可能重新可做 关联的 PR 已关闭且未合并。 未关闭type: feature request
难度 1/5 1-3 小时 新手友好度 70/100
DataDog/dd-trace-java#10245 · 1 条评论 ·
维护者通常 2 天内回复
-
gRPC server instrumentations (grpc-1.5, armeria-grpc) don't make extracted W3C baggage current in the handler可能已有人在做 @mcculls 于 13 天前认领。 未关闭comp: context propagation inst: grpc type: feature request
难度 3/5 1-2 天 新手友好度 78/100
DataDog/dd-trace-java#12654 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 62/100
DataDog/dd-trace-java#12608 ·
维护者通常 2 天内回复
-
type: bug report
难度 4/5 3-5 天 新手友好度 35/100
DataDog/dd-trace-java#12597 ·
维护者通常 2 天内回复
查看 DataDog/dd-trace-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
openhab/openhab-addons#21921 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
jellyfin/jellyfin-androidtv#5885 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
objectionary/eo-graphs#85 ·
-
XtYaml throws a bare ClassCastException when sheets or asserts is a scalar or holds a non-string未关闭
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/xax#246 ·
维护者通常 1 天内回复