Repository navigation
Conversation
The compiler holds millions of small objects. The runtime of the distribution carries the base class data sharing archive for compact object headers (wurstscript/WurstScript#1389), which a JVM uses only in the header mode it runs with, so the compiler is started with the option.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closing: the shipped JRE is being upgraded to 27 by another change, which makes this unnecessary. |
What
InstallationManager.compilerLaunchCommand(used forgrill build,grill generateand the version probe) starts the compiler with-XX:+UseCompactObjectHeaders. The compiler holds millions of small objects: on castle fight compact headers took 6% off the language server's heap (488 to 457 MB after a collection) at the same start time.Companion to wurstscript/WurstScript#1389, whose runtime ships the base CDS archive for that header mode (
classes_coh.jsa); a JVM uses a base archive only in the header mode it runs with. The option is valid on JDK 25, which the compiler jar needs anyway. Passing it where the user'sJAVA_TOOL_OPTIONSalso has it is harmless (checked on the distribution's runtime: both, and on/off/on, start with-Xshare:on).Checks
InstallationTests.testCompilerLaunchCommandUsesCompactObjectHeadersasserts the whole command; it failed before the change and passes now../gradlew test --tests InstallationTests.