Skip to content

Commit

Permalink
Differentiated memory settings
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Dec 1, 2024
1 parent 8067c88 commit 6706b09
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion resources/dayon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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}" "$@"
10 changes: 9 additions & 1 deletion resources/snap/dayon.launcher
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"

0 comments on commit 6706b09

Please sign in to comment.