From 6706b0916e8d59cb4759e23c6d2d2530d951f3c4 Mon Sep 17 00:00:00 2001 From: retgal Date: Sun, 1 Dec 2024 14:21:19 +0100 Subject: [PATCH] Differentiated memory settings --- resources/dayon.sh | 9 ++++++++- resources/snap/dayon.launcher | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/dayon.sh b/resources/dayon.sh index 3edce22e..58ecde98 100755 --- a/resources/dayon.sh +++ b/resources/dayon.sh @@ -20,7 +20,6 @@ elif [ ! -f /etc/alternatives/java ]; then else JAVA=$(ls -l /etc/alternatives/java | awk -F'> ' '{print $2}') fi -JAVA_OPTS="-Xmx512M" case "$@" in *log=console*) LOG= @@ -29,5 +28,13 @@ case "$@" in LOG="-Ddayon.log=file" ;; esac +case "$@" in + *assistant*) + JAVA_OPTS="-Xmx512m" + ;; + *) + JAVA_OPTS="-Xmx1g" + ;; +esac JAR="${DAYON_HOME}/dayon.jar" ${JAVA} ${JAVA_OPTS} ${LOG} -jar "${JAR}" "$@" diff --git a/resources/snap/dayon.launcher b/resources/snap/dayon.launcher index e091a32c..e93d806e 100755 --- a/resources/snap/dayon.launcher +++ b/resources/snap/dayon.launcher @@ -7,4 +7,12 @@ case "$@" in LOG="-Ddayon.log=file" ;; esac -java ${LOG} -Xmx1g -jar "$@" +case "$@" in + *assistant*) + JAVA_OPTS="-Xmx512m" + ;; + *) + JAVA_OPTS="-Xmx1g" + ;; +esac +java ${JAVA_OPTS} ${LOG} -jar "$@"