From 12d7b0521d91432e415e50ec57b2d726b2968be4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 4 Dec 2023 19:25:11 +0100 Subject: [PATCH] :paperclip: Add better approach for set devenv jvm resource limits --- backend/scripts/repl | 4 ++-- common/shadow-cljs.edn | 4 ---- docker/devenv/files/bashrc | 6 ++++++ exporter/shadow-cljs.edn | 1 - frontend/shadow-cljs.edn | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/scripts/repl b/backend/scripts/repl index 299211581..e2cd441c0 100755 --- a/backend/scripts/repl +++ b/backend/scripts/repl @@ -75,7 +75,7 @@ export OPTIONS=" export OPTIONS="$OPTIONS -J--enable-preview" # Setup HEAP -export OPTIONS="$OPTIONS -J-Xms50m -J-Xmx1024m" +# export OPTIONS="$OPTIONS -J-Xms50m -J-Xmx1024m" # export OPTIONS="$OPTIONS -J-Xms1100m -J-Xmx1100m -J-XX:+AlwaysPreTouch" # Increase virtual thread pool size @@ -88,7 +88,7 @@ export OPTIONS="$OPTIONS -J-Xms50m -J-Xmx1024m" # export OPTIONS="$OPTIONS -J-Xint" # Setup GC -export OPTIONS="$OPTIONS -J-XX:+UseG1GC" +# export OPTIONS="$OPTIONS -J-XX:+UseG1GC" # Setup GC # export OPTIONS="$OPTIONS -J-XX:+UseZGC" diff --git a/common/shadow-cljs.edn b/common/shadow-cljs.edn index a06131055..274f6dae1 100644 --- a/common/shadow-cljs.edn +++ b/common/shadow-cljs.edn @@ -1,8 +1,4 @@ {:deps {:aliases [:dev]} - ;; :http {:port 3448} - ;; :nrepl {:port 3447} - :jvm-opts ["-Xmx700m" "-Xms100m" "-XX:+UseSerialGC" "-XX:-OmitStackTraceInFastThrow"] - :builds {:test {:target :node-test diff --git a/docker/devenv/files/bashrc b/docker/devenv/files/bashrc index 420ebe213..bb53eb472 100644 --- a/docker/devenv/files/bashrc +++ b/docker/devenv/files/bashrc @@ -1,9 +1,15 @@ #!/usr/bin/env bash export PATH=/usr/lib/jvm/openjdk/bin:/usr/local/nodejs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin +export JAVA_OPTS="-Xmx900m -Xms50m" alias l='ls --color -GFlh' alias rm='rm -r' alias ls='ls --color -F' alias lsd='ls -d *(/)' alias lsf='ls -h *(.)' + +# include .bashrc if it exists +if [ -f "$HOME/.bashrc.local" ]; then + . "$HOME/.bashrc.local" +fi diff --git a/exporter/shadow-cljs.edn b/exporter/shadow-cljs.edn index 2fde74be3..1c24414c6 100644 --- a/exporter/shadow-cljs.edn +++ b/exporter/shadow-cljs.edn @@ -1,6 +1,5 @@ {:deps {:aliases [:dev]} :source-paths ["src" "vendor" "../common"] - :jvm-opts ["-Xmx512m" "-Xms50m" "-XX:+UseSerialGC"] :builds {:main diff --git a/frontend/shadow-cljs.edn b/frontend/shadow-cljs.edn index e08e48e9e..c5eb31628 100644 --- a/frontend/shadow-cljs.edn +++ b/frontend/shadow-cljs.edn @@ -1,7 +1,6 @@ {:deps {:aliases [:dev]} :http {:port 3448} :nrepl {:port 3447 :host "0.0.0.0"} - :jvm-opts ["-Xmx700m" "-Xms100m" "-XX:+UseSerialGC" "-XX:-OmitStackTraceInFastThrow"] :dev-http {8888 "classpath:public"} :builds