Skip to content

Write helpers into module bytecode directly - #12134

Closed
sarahchen6 wants to merge 3 commits into
sarahchen6/infer-helper-classes-pt-1from
sarahchen6/use-array
Closed

Write helpers into module bytecode directly#12134
sarahchen6 wants to merge 3 commits into
sarahchen6/infer-helper-classes-pt-1from
sarahchen6/use-array

Conversation

@sarahchen6

@sarahchen6 sarahchen6 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Write the build-time-resolved helper list directly into each module's helperClassNames() bytecode. The transformer will now read helper class names directly instead of needing to load the $Muzzle class.

Motivation

Without this change, the $Muzzle side class is loaded eagerly to get the helper class names, negatively affecting startup time. Instead we can write the helpers directly into the bytecode and avoid loading the muzzle class.

Additional Notes

This is built off of #12059 and offers an alternative to #12116 in addressing the startup time issues. The changes here are more minimal, but we are rewriting the module bytecode in place.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.00 s 13.95 s [-0.3%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 12.96 s 12.93 s [-0.6%; +1.1%] (no difference)
startup:petclinic:appsec:Agent 16.15 s 16.72 s [-7.8%; +0.9%] (no difference)
startup:petclinic:iast:Agent 16.84 s 16.88 s [-1.0%; +0.5%] (no difference)
startup:petclinic:profiling:Agent 16.79 s 16.06 s [+0.2%; +8.9%] (maybe worse)
startup:petclinic:sca:Agent 16.63 s 16.48 s [-0.0%; +1.9%] (no difference)
startup:petclinic:tracing:Agent 15.69 s 16.07 s [-6.5%; +1.7%] (no difference)

Commit: 3971a58f · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@amarziali

Copy link
Copy Markdown
Contributor

It looks way better in terms of startup. As discussed a possible improvement is to write it deparately from the muzzle plugin still reusing part of its logic for the class dependency find

@sarahchen6
sarahchen6 force-pushed the sarahchen6/infer-helper-classes-pt-1 branch from 29b0bff to a8cdba9 Compare August 11, 2026 16:52
@sarahchen6
sarahchen6 force-pushed the sarahchen6/use-array branch from 3dc6d89 to f147e6b Compare August 11, 2026 17:15
@sarahchen6

Copy link
Copy Markdown
Contributor Author

These changes make more sense directly a part of #12059 - I've cherry-picked the commits here onto that PR and will now close this one.

@sarahchen6 sarahchen6 closed this Aug 11, 2026
@sarahchen6
sarahchen6 deleted the sarahchen6/use-array branch August 11, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants