Open bombcar opened 2 years ago
setupCIworkspace will not install graphics and audio libs and such client runtime things. Less dependencies -> less ram usage. We can probably just double the values and be fine with it on all projects
open computer by far will be the worst of all I've seen - it's entirely SCALA and large
bombcar 56236 0.4 5.2 36769760 879844 ?? Ss 9:59AM 0:33.25 /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home/bin/java -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/bombcar/.gradle/wrapper/dists/gradle-6.9.1-bin/8v22qtfm3hkyawbegpd68cyk3/gradle-6.9.1/lib/gradle-launcher-6.9.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.9.1
bombcar 56220 0.2 1.4 35930492 241752 s002 S+ 9:59AM 0:01.55 /Library/Java/JavaVirtualMachines/graalvm-ce-java8-21.0.0.2/Contents/Home/bin/java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/bombcar/IdeaProjects/OpenComputers/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/bombcar/IdeaProjects/OpenComputers/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain clean setupDecom idea genI
So on my Mac with all gradles dead, it does above - it calls it with 64mb but something else ups that to 512.
it is NOT JAVA_OPTS or GRADLE_OPTS at least by default, as those aren't set:
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
The org.gradle.jvmargs Gradle property controls the VM running the build. It defaults to -Xmx512m "-XX:MaxMetaspaceSize=256m"
https://docs.gradle.org/6.9.1/userguide/build_environment.html#sec:configuring_jvm_memory
The JAVA_OPTS environment variable controls the command line client, which is only used to display console output. It defaults to -Xmx64m
repo had an issue compiling OpenComputer on Windows - it crashed out due to lack of RAM.
there are jvm options in the gradlew and gradle.bat but the same limit didn’t seem to crash me out but it may have reused a previous gradle.
It would be nice for those to be reasonable amounts and easily changed in one place.
What’s interesting is if CI worked with them - did it actually use them? They were like 64m