Skip to content

Start the compiler with compact object headers - #85

Closed
Frotty wants to merge 1 commit into
masterfrom
compact-object-headers
Closed

Frotty wants to merge 1 commit into
masterfrom
compact-object-headers

Conversation

@Frotty

@Frotty Frotty commented Oct 8, 2026

Copy link
Copy Markdown
Member

What

InstallationManager.compilerLaunchCommand (used for grill build, grill generate and 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's JAVA_TOOL_OPTIONS also has it is harmless (checked on the distribution's runtime: both, and on/off/on, start with -Xshare:on).

Checks

  • New InstallationTests.testCompilerLaunchCommandUsesCompactObjectHeaders asserts the whole command; it failed before the change and passes now.
  • ./gradlew test --tests InstallationTests.

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.
@Frotty

Frotty commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T13:02:43.362691Z 1f4cee0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 1f4cee005b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@Frotty

Frotty commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Closing: the shipped JRE is being upgraded to 27 by another change, which makes this unnecessary.

@Frotty Frotty closed this Oct 8, 2026
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.

1 participant