-
Notifications
You must be signed in to change notification settings - Fork 1
🐛 Bump max memory limit for JVM #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # KOTLIN | ||
| kotlin.code.style=official | ||
| # JVM | ||
| org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
| org.gradle.jvmargs=-Xmx8192M -Dkotlin.daemon.jvm.options\="-Xmx8192M" -Dfile.encoding\=UTF-8 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allocating 8GB to both the Gradle daemon and the Kotlin daemon (via |
||
| # ANDROID | ||
| android.useAndroidX=true | ||
| # MP | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider setting initial heap size and providing justification.
Two operational recommendations:
Add
-Xms(initial heap size): Setting only-Xmxmeans the JVM starts with a small heap and expands gradually, causing frequent GC pauses during growth. Consider adding-Xms4096Mor-Xms8192Mfor more predictable performance.Document the rationale: The PR mentions "some new projects encountered problems" but doesn't specify what problems or why 8GB is the appropriate fix. This makes it difficult to assess whether this is addressing the root cause or masking an underlying issue (e.g., memory leaks, inefficient build configuration, missing build cache configuration).
💡 Example with initial heap size
📝 Committable suggestion
🤖 Prompt for AI Agents
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 551
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 1309
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 236
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 236
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 513
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 93
🏁 Script executed:
# Read the gradle.properties file cat -n gradle.propertiesRepository: MateeDevs/MateeStarter
Length of output: 886
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 96
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 1174
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 4360
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 176
🏁 Script executed:
Repository: MateeDevs/MateeStarter
Length of output: 48
🏁 Script executed:
# Look at the git diff for the gradle.properties change git show 89ee0deRepository: MateeDevs/MateeStarter
Length of output: 50382
Justify the 8GB heap increase and investigate the root cause of memory issues.
This commit increases the maximum JVM heap from 2GB to 8GB (4x increase) without explaining why. While your CI uses a self-hosted runner (
pikachu) that likely has adequate memory, such a significant increase warrants:--no-build-cacheand--no-configuration-cacheflags in workflow suggest potential optimization)?GRADLE_OPTSenvironment variable or build-type specific overrides, rather than a blanket 8GB global default.The
kotlin.daemon.jvm.optionssyntax is correct, but the lack of initial heap size (-Xms) means the JVM starts small and expands dynamically—consider also setting-Xms4096Mfor more predictable memory behavior.🤖 Prompt for AI Agents