Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Startup ~2x slower with AOT class linking: agent retransforms ~22k preloaded classes (JDK 25, 1.67.0)

未关闭
#12,795 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 2 天内回复

@mcculls 已经在做这个了。

开始于 2026年10月8日。

评估

这个 Issue 还没有评估数据。

描述

type: bug report
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:

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DataDog/dd-trace-java 的其他 Issue

查看 DataDog/dd-trace-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。